2017-09-28 65 views
2

我正在使用Google地圖。當我嘗試添加下面的依賴關係時,我得到這個錯誤。 android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 23.2.1, 23.0.0. Examples include com.android.support:animated-vector-drawable:23.2.1 and com.android.support:mediarouter-v7:23.0.0android.support庫必須使用完全相同的版本規範

我得到的錯誤在這行compile 'com.android.support:appcompat-v7:23.2.1'

這裏是我的gradle產出:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion '25.0.0' 

    defaultConfig { 
     applicationId "gs.app.lugmah" 
     minSdkVersion 15 
     targetSdkVersion 23 
     versionCode 3 
     versionName "1.2" 
     multiDexEnabled true 
    } 
    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_7 
     targetCompatibility JavaVersion.VERSION_1_7 
    } 

    lintOptions { 
     xmlReport false 
     warningsAsErrors true 
     quiet false 
     showAll true 
     disable 'OldTargetApi', 'UnusedAttribute', 'LongLogTag' 
    } 
} 
dependencies { 
    testCompile 'junit:junit:4.12' 
    compile 'com.google.android.gms:play-services:9.0.0' 
    compile 'com.android.support:appcompat-v7:23.2.1' 
    compile 'com.android.support:design:23.2.1' 
    compile 'com.github.bumptech.glide:glide:3.6.1' 
    compile 'com.baoyz.swipemenulistview:library:1.3.0' 
    compile 'com.loopj.android:android-async-http:1.4.9' 
    compile 'com.github.vlonjatg:progress-activity:v1.0.3' 
    compile 'com.google.android.gms:play-services-auth:9.0.0' 
    compile 'com.facebook.android:facebook-android-sdk:4.11.0' 
    compile 'com.facebook.fresco:fresco:0.10.0' 
    compile 'com.github.nicolasjafelle:paginglistview:1.2' 

} 

如果我評論此行compile 'com.google.android.gms:play-services:9.0.0'然後正常工作與compile 'com.android.support:appcompat-v7:23.2.1'沒有錯誤或紅線 誰能幫我解決這個問題?

回答

1

不要使用遊戲服務的所有模塊,只需添加

 compile 'com.google.android.gms:play-services-maps:9.0.0' 
+0

謝謝你這麼多。你拯救了我的一天。 – Jacky

相關問題