2016-10-30 12 views
1

アンドロイドスタジオを更新した後、プロジェクトを実行しようとしましたが、依存関係との競合があるというエラーが表示されています。com.android.support:support-annotations 'Android:Gradle build failed

この私のbuild.gradleファイル

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 24 
buildToolsVersion '24.0.3' 
defaultConfig { 
    applicationId "com.example.abdelnacer.parentooandroid" 
    minSdkVersion 21 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
productFlavors { 
} 
} 


repositories { 
maven { url "https://oss.sonatype.org/content/repositories/snapshots"  } 
} 

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:24.2.1' 
compile 'com.android.support:design:24.2.1' 
compile 'com.parse.bolts:bolts-android:1.+' 
compile 'com.parse:parse-android:1.+' 
compile 'com.parse:parsefacebookutils-v4-android:[email protected]' 
compile 'com.parse:parseui-widget-android:0.0.1' 
compile 'com.facebook.android:facebook-android-sdk:4.+' 
testCompile 'org.mockito:mockito-core:1.+' 
testCompile 'org.robolectric:robolectric:3.2-SNAPSHOT' 
androidTestCompile 'com.android.support.test:runner:0.5' 
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2' 
androidTestCompile 'com.android.support:support-annotations:24.2.1' 
compile 'com.google.guava:guava:19.0' 
compile 'com.google.android.gms:play-services:9.2.0' 
compile 'com.google.android.gms:play-services-location:9.2.0' 
compile 'org.apache.commons:commons-io:1.3.2' 
compile 'com.google.code.gson:gson:2.3.1' 
compile 'com.wefika:flowlayout:0.4.1' 
compile 'com.facebook.shimmer:shimmer:[email protected]' 
compile 'com.github.armcha:LuseenBottomNavigation:1.8.2' 
} 

とエラー

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] 
Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (25.0.0) and test app (24.2.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details. 
Error:Execution failed for task ':app:prepareDebugAndroidTestDependencies'. 
> Dependency Error. See console for details. 

私は本当に問題なのかを把握することはできませんか?

+0

エラーを確認すると、「詳細はhttp://g.co/androidstudio/app-test-app-conflict」を参照してください。エラーに記載されているページにアクセスすると、問題の説明が表示されます。また、主要な検索エンジンで 'com.android.support:support-annotations conflict'を検索すると、あなたは[このような]答えを出すでしょう(http://stackoverflow.com/a/33318482/115145)。 – CommonsWare

+2

あなたのライブラリの1つが注釈バージョン25.0.0をインポートしています。 './ gradlew dependencies'を実行して、依存関係ツリー内のどれか1つを参照してください。 – njzk2

答えて

1

追加:あなたのLIBの

androidTestCompile "com.android.support:support-annotations:25.0.0" 
+0

opは他のすべてのサポートライブラリに対してv24.2.1を使用しています。 – njzk2

+0

いいえ - 彼のstacktraceを参照してください - 1つのlibは25.0.0でpulligです - 彼はそれを取得します:app(25.0.0)とtest app(24.2.1)の解決されたバージョンが異なります。 – ligi

+0

ありがとう、今それは動作します。 –

0

たぶん1、この依存関係を使用します。 API 25をインストールし、SDKマネージャのすべてを更新するだけです。

関連する問題