我已經研究了一段時間,沒有找到任何幫助。我幾乎完成了我的應用程序,我希望添加Google登錄功能。我並沒有要求任何人爲我糾正我的代碼。我只需要指出正確的方向。每個網站,包括android開發者網站,都沒有幫助。任何你的幫助表示讚賞。再次,我只需要指出正確的方向,不要爲我寫的代碼。GoogleApiClient for Google登錄
做了什麼答案告訴我,並得到這個錯誤代碼。首先它告訴我改爲10.2.1,然後改爲9.0.0:
錯誤:執行任務':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.
這是我的搖籃文件:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'cm'
keyPassword 'cr3101120$$'
storeFile file('C:/Users/Carter/AndroidStudioProjects/ColorMatch/release.jks')
storePassword 'cr3101120$$'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "carsquared.colormatch"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
debug {
signingConfig signingConfigs.config
zipAlignEnabled true
}
}
productFlavors {
}
}
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'
})
apply plugin: 'com.google.gms.google-services'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-messaging:10.2.6'
compile 'com.google.android.gms:play-services-auth:10.2.6'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
這裏的主要搖籃:
// 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.2'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
看到的代碼休息穀歌標誌添加這種依賴關係 依賴{ // .. 編譯「com.google.android.gms:發揮服務-auth的: 9.2.1' // glide被添加來加載g +個人資料圖片。忽略,如果你想 編譯「com.github.bumptech.glide:滑翔:3.7.0」 } 應用插件:「com.google.gms.google服務」 – MageNative
我做過的一切,我得到這個錯誤碼。首先它告訴我將它更新到10.2.1。所以我做了。然後它告訴我'更新'到9.0.0。以下是錯誤:錯誤:任務':app:processDebugGoogleServices'的執行失敗。 >請修正版本衝突,方法是更新google-services插件的版本(有關最新版本的信息,請訪問https://bintray.com/android/android-tools/com.google.gms.google-services /)或將com.google.android.gms的版本更新爲9.0.0。 –
讓我看看你的項目gradle文件 – MageNative