我研究了一段时间,没有发现任何有用的东西。我几乎完成了我的应用程序,我希望添加谷歌登录功能。我没有要求任何人为我纠正我的密码。我只需要被指引到正确的方向。每个网站,包括android开发者网站,都没有得到任何帮助。如果你能提供任何帮助,我们将不胜感激。再说一遍,我只需要被指向正确的方向,而不是为我编写代码。
做了答案告诉我的,得到了这个错误代码。首先它告诉我改为10.2.1,然后9.0.0:
错误:任务执行失败“:app:processDebugGoogleServices”。
请通过更新google插件的版本(有关最新版本的信息可在https://bintray.com/android/android-tools/com.google.gms.google-services/上获得)或将com.google.android.gms的版本更新为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
}发布于 2017-05-31 07:11:08
keytool -exportcert -list -v -keystore E:\JKSFile\GoEthno.jks E:\JKSFile\GoEthno.jks = your jks file path
d.Copy SHA-1及粘贴于固定位置添加此依赖项依赖项
{ // .. compile 'com.google.android.gms:play-services-auth:9.2.1' // glide is added to load the g+ profile image. Ignore if you want compile 'com.github.bumptech.glide:glide:3.7.0' } apply plugin: 'com.google.gms.google-services'
您可以在这里看到google注册的其余代码,http://www.androidhive.info/2014/02/android-login-with-google-plus-account-1/
https://stackoverflow.com/questions/44277707
复制相似问题