这是我尝试构建应用程序时遇到的错误
错误:任务“: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 9.0.0.
这些是我在项目中使用的依赖项
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile('com.mikepenz:materialdrawer:3.1.0@aar') {
transitive = true
}
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
compile 'com.nineoldandroids:library:2.4.+'
compile 'com.google.android.gms:play-services-ads:9.2.0'
compile 'com.google.android.gms:play-services-appindexing:9.2.0'
compile 'in.srain.cube:grid-view-with-header-footer:1.0.12'
compile 'com.quinny898.library.persistentsearch:library:1.1.0-SNAPSHOT'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.github.amlcurran.showcaseview:library:5.4.1'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.google.api-client:google-api-client-android:1.20.0' exclude module: 'httpclient'
compile 'com.google.http-client:google-http-client-gson:1.20.0' exclude module: 'httpclient'
compile 'com.google.apis:google-api-services-vision:v1-rev2-1.21.0'
compile 'com.google.firebase:firebase-core:9.2.0'
compile 'com.google.firebase:firebase-messaging:9.2.0'
compile 'me.gujun.android.taggroup:library:1.4@aar'
}
最佳答案
在网上搜索了 2 天后,我终于找到了解决方案。
我将 apply plugin: 'com.google.gms.google-services'
放在我的 build.gradle 文件的末尾。
但是我仍然不明白为什么我把它写在上面时它不起作用。
谷歌可能知道 :P
关于java - 更新 android studio 和新的 sdk 后得到 "Error:Execution failed for task ' :app:processDebugGoogleServices'. 我该如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38263850/