2017-09-28 63 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

相关问题