这是一直出现的错误:
错误:任务':app:processDebugGoogleServices'执行失败。请通过更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms的版本更新为9.2.0来修复版本冲突。
这是我的build.gradle文件:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
compile "com.google.android.gms:play-services-gcm:9.2.0"
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.android.gms:play-services-gcm:11.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.26.+'
compile 'com.android.support:appcompat-v7:26.0.2-alpha'
compile 'com.android.support:design:26.+'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:support-v4:26.+'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:0)
错误是因为您正在使用不同版本的播放服务进行以下更改
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
compile "com.google.android.gms:play-services-gcm:11.0.0"<---- change
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.android.gms:play-services-gcm:11.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.26.+'
compile 'com.android.support:appcompat-v7:26.0.2-alpha'
compile 'com.android.support:design:26.+'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:support-v4:26.+'
compile 'com.google.firebase:firebase-database:11.0.0'<----- change
testCompile 'junit:junit:4.12'
}