2016-08-01 16 views
3

私は、gradleの現在のバージョン - 2.10でAndroidスタジオ2.1.1を使用しています。Androidスタジオでgradleバージョンをアップグレードすることができません

私は次のことを行っているそのために私は、2.14.1にGradleのバージョンをアップグレードしようとしています:

build.gradlegradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip 

で:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.12' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

同期時には、次のエラーが表示されます。

Error:Could not find com.android.tools.build:gradle:2.14.1. 
Searched in the following locations: 
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/2.14.1/gradle-2.14.1.pom 
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/2.14.1/gradle-2.14.1.jar 
    https://jcenter.bintray.com/com/android/tools/build/gradle/2.14.1/gradle-2.14.1.pom 
    https://jcenter.bintray.com/com/android/tools/build/gradle/2.14.1/gradle-2.14.1.jar 
Required by: 
    :MultiPanePlayer:unspecified 

プロジェクトレベルの設定には、「デフォルトのグラデーションラッパーを使用する(推奨)」というオプションがあります。他に何かが足りないのですか?

+1

'試しcom.android.tools.build解決サンプルプロジェクトレベルのbuild.gradleでコンパイル –

+0

更新のためのいくつかの詳細を2.1.2'は、 – jay

+1

いけない」混乱をご確認ください。 android gradleプラグインを使用して構築ツールをグラデーションします。彼らは異なるバージョン番号を持っています。あなたはプラグインバージョン2.1.2を望む – Henry

答えて

0

問題gradleプラグインが更新されないというエラーが解決されました。このエラーが発生した場合は、@Henryが述べたようにプラグインのバージョンを2.1.2に更新する必要があります。 (2.1.2であり、2.12ではないことに注意してください)。 Gradleの:ここに私のエラー -

// Top-level build file where you can add configuration options common to all sub-projects/modules. 
buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.1' 
    } 
} 
allprojects { 
    repositories { 
     jcenter() 
    } 
} 
関連する問題