小编mus*_*mme的帖子

Google登录始终在GoogleSignInResult上失败

我需要你的帮助......我不知道了!

我不明白为什么每次都失败了.

  • 我生成了ID客户端OAuth 2.0.
  • 我已生成并移动google-services.json./app文件夹中.
  • 通过Google Cloud Console,所有Google API都已激活.

退房,如果有什么伤害你......继续!

亲切的问候

build.gradle:

apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "sign.in.gogoleplusconnect"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-identity:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
}
Run Code Online (Sandbox Code Playgroud)

activity_main.xml中

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android google-api google-plus google-play-services

7
推荐指数
1
解决办法
7073
查看次数