2017-11-21 5 views
0

私はアンドロイドを新しくしました。私はアンドロイドスタジオ3.0で新しいプロジェクトのプロジェクトを開始したが、Gradleのがエラーを構築した後は、次のように示されている:私はこのブログがあなたの質問への答えを持っていると思うアンドロイドスタジオ3.0で新しいプロジェクトを開始する際にエラーが発生しました

Error:Unable to resolve dependency for 
    ':[email protected]/compileClasspath': 
     Could not resolve 
      javax.annotation:javax.annotation-api:1.2. 

Screen Shot of android studio

`apply plugin: 'com.android.application' 

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

dependencies { 
    implementation fileTree(dir: 'libs', include: ['*.jar']) 
    implementation 'com.android.support:appcompat-v7:26.1.0' 
    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
    testImplementation 'junit:junit:4.12' 
    androidTestImplementation 'com.android.support.test:runner:0.5' 
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2' 
}` 
+0

は私に、アプリケーションの 'build.gradle' –

+0

を示しを書きます.gradle –

+0

プロジェクトのクリーンアップと再構築を試みます。 –

答えて

0

私はあなたのエラーはやや制限的なネットワーク接続が存在する環境で発生する見てきました。

check this out

0

この

を試してみてはさえ、私は同じ問題に直面し、私はあなたの

にこのソリューション、

Go]を得ました

plzのビルドを確認し、以下のコードと同期プロジェクト

android.enableAapt2=false 

例の画像で enter image description here

関連する問題