请通过更新google-services插件

时间:2017-08-25 07:44:20

标签: android firebase android-gradle google-play-services

我使用了代码如下代码。我得到了这个例外。我根据链接完成了我的代码检查了几个链接。但仍然有问题 请建议我克服这个问题

错误:任务':app:processDebugGoogleServices'执行失败。

  

请通过更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms的版本更新为10.2.6来修复版本冲突

我喜欢这个

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
final RETROFIT = '2.3.0'
final SUPPORT_LIBRARY_VERSION = '25.3.1'
final FIREBASE_VERSION = '10.0.1'
final PLAY_SERVICE = '10.2.6'

//support
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"


compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'

//api inspection
compile 'com.facebook.stetho:stetho:1.4.2'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.2'

//api
compile "com.squareup.retrofit2:retrofit:$RETROFIT"
compile "com.squareup.retrofit2:converter-gson:$RETROFIT"
compile 'com.google.code.gson:gson:2.7'

//play
compile "com.google.android.gms:play-services-location:$PLAY_SERVICE"
compile "com.google.android.gms:play-services-analytics:$PLAY_SERVICE"

//push
compile "com.google.firebase:firebase-core:$FIREBASE_VERSION"

//mutlidex
compile 'com.android.support:multidex:1.0.0'
//image
compile 'com.github.bumptech.glide:glide:3.7.0'
//log
compile 'com.jakewharton.timber:timber:4.5.1'
//scan
compile 'com.google.zxing:core:3.0.1'
//others
compile 'me.relex:circleindicator:1.2.2'
}

apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:4)

您正在使用相同库的不同版本。

final FIREBASE_VERSION = '10.0.1'
final PLAY_SERVICE = '10.2.6

请注意,Firebase与Google Play服务库存在依赖关系。