2016-11-12 9 views
3

Android Studioを安定版2.2からカナリーチャンネル2.3にうれしく更新しました。アンドロイド:Android Studioを2.3にアップグレードした後にプロジェクトをビルドできません

しかし、残念ながら、深刻なバグがあります。プロジェクトは構築できません。

Gradle 'MyApplication' project refresh failed 
Error:A problem occurred configuring project ':app'. 

build.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.0-alpha1' 

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

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

build.gradle(アプリ 私は同じ以下のエラーを得た、私の以前のプロジェクトを開いてみましたし、また、新たなサンプルアプリケーションを作成してみました):

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.0" 
    defaultConfig { 
     applicationId "com.example.chint.myapplication" 
     minSdkVersion 16 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.0.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7' 
    compile 'com.android.support:design:25.0.0' 
    testCompile 'junit:junit:4.12' 
} 

この問題は唯一ですか?

enter image description here

は、あなたが既に持っているビルドバージョンと

滞在を "後で通知する" とませ "更新"を選択してください:このダイアログが表示されている間

+1

適切な理由で投票を停止すると常に役立ちます。 –

答えて

2

ので、注意してください。

を包みなさい、あなたはとてもちょうど1以下にbuild.gradle(project)であなたのAndroidのGradleプラグインのクラスパスをロールバック、更新を押す:

classpath 'com.android.tools.build:gradle:2.2.2' 

これは私のために働きました。

0

私は同様の問題を戦い、2文字を追加して、それを解決...

と3.2.1のすべてを対象とするgradle-wrapper.propertiesを更新した後、私のため

distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-all.zip 
0
If you import external libraries apply changes for "allprojects" 

// 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' 

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

allprojects { 
    repositories { 
     jcenter() 
     mavenCentral() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
素晴らしかったです
0

Androidスタジオのグラデーションを手動で更新する必要があります。

1°ステップ:

このパスに従ってください、あなたは "Gradleの-XX" を取得しますあなたのGradleバージョンここで

C:\Users\[USER_NAME]\.gradle\wrapper\dists 

を取得する(X-バージョンである)私の場合にはそれが "でしたGradleの-3.3-すべて」

2°ステップ:次のリンクへ

移動します。

https://services.gradle.org/distributions/

長いランダムな名前の最後のフォルダにそれぞれのバージョンのzipファイルをダウンロードし、それ以前。

HERE

C:\Users\[USER_NAME]\.gradle\wrapper\dists\gradle-x.x\55gk2rcmfc6p2dg9u9ohc31212

は今、私はこれが働くことを願って、Androidのスタジオを開きます。

+0

いくつかの書式を作って、読めるようにしてください。 – Gahan

+0

Yup Gahan、ありがとうDwhitz –

関連する問題