好吧一切正常,直到我生成签名的apk.我在谷歌开发者页面上讲述了整个过程
1.我生成了带有keyhash和包名称的google-services.json文件2.
包括所有类级别和应用程序级别依赖关系
// 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:1.3.0'
classpath 'com.google.gms:google-services:2.0.0-alpha6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
应用程序gradle文件
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.example.skmishra.finalgooglesignin"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName …Run Code Online (Sandbox Code Playgroud)