我正在使用Android Studio 2.3.3。我尝试在我的应用中使用Firebase RealTime身份验证,我收到此错误:
错误:任务':app:processDebugGoogleServices'执行失败。
请通过更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms的版本更新为10.2.0来修复版本冲突
我的项目gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我的模块gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "com.ccnstudent.hridoychandradas.ccnapp"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:11.0.2'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:0)
我认为您应该检查google-services.json文件的拼写。如果没有,请右键单击该文件选择refactor - >到google-services.json