我在android studio中为我的项目添加了一个空的谷歌地图活动,但我收到此错误消息:
::
我的应用级build.gradle文件包含:
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.0.1.
我的项目级build.gradle文件包含:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "XXXXXXXXXX"
minSdkVersion 15
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.1.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-maps:10.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
如何解决此问题?感谢任何帮助,谢谢。
答案 0 :(得分:1)
而不是使用compile 'com.google.android.gms:play-services-maps:10.2.0'
使用此compile com.google.android.gms:play-services-maps:10.0.1'
答案 1 :(得分:1)
将包com.google.firebase:firebase-auth:10.0.1
更新为com.google.firebase:firebase-auth:10.2.0
。
您应该尝试使用基于播放服务的相同版本的库来避免冲突