我收到了这样的错误:
错误:任务':app:processDebugGoogleServices'执行失败。
请通过更新版本来修复版本冲突 google-services插件或将com.google.android.gms的版本更新为9.0.0。
如何更新google-service插件或更新com.google.android.gms版本?或者我应该在build.gradle中更改什么?
我的app / build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions{
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
// Firebase Authentication
compile 'com.google.firebase:firebase-auth:9.4.0'
// Google Sign In SDK (only required for Google Sign In)
compile 'com.google.android.gms:play-services-auth:9.4.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
}
apply plugin: 'com.google.ms.google-services'
根build.grade
代码:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:1)
你的剧本中有拼写错误:
apply plugin: 'com.google.ms.google-services'
应该是
apply plugin: 'com.google.gms.google-services'