2017-06-05 3 views
0

私はアンドロイドスタジオのプレビュー3.0カナリーを更新します3.この後、プロジェクトを実行しようとしていますが、アンドロイドスタジオプレビュー3.0のカナリーの更新後にプロジェクトをビルドすることができません

Error:Could not find com.android.tools.build:gradle:3.0.0. 
Searched in the following locations: 
    file:/opt/android-studio-preview/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom 
    file:/opt/android-studio-preview/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar 
    https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom 
    https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar 
Required by: 
    project : 
+0

あなたは新しいプラグインに正しく移行されていることを確認するにはこちらをお読みください:https://developer.android.com/studio/preview/features/new-android-plugin -migration.html – MatPag

+0

質問を元の質問に戻しましたが、質問した後に質問を変更しないでください。 –

答えて

6

あなたがする必要がある主なものは以下のとおりです。

変更プロジェクトレベルbuild.gradleファイル:

buildscript { 
    repositories { 
     ... 
     // You need to add the following repository to download the 
     // new plugin. 
     maven { 
      url 'https://maven.google.com' 
     } 
    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-alpha3' 
    } 
} 

変更、現在入手可能な最新のごgradle-wrapper.propertiesのdistributionUrlをGradleのリリース。 classpath(この後

distributionUrl=https://services.gradle.org/distributions/gradle-4.0-rc-1-all.zip 

はまだコンパイルできなかったプロジェクトを段階的に説明し、あなたのbuild.gradle (project_name)さんに1行を変更して新しいプラグイン

0

にアプリbuild.gradleを変換する方法についてのすべての指示hereを実行する必要があり)更新ごとのように: -

dependencies { 
    classpath 'com.android.tools.build:gradle:3.0.0-alpha3' 

    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 
関連する問題