Я работаю над входом в Google, но получаю сообщение об ошибке ОТМЕНЕНО, код ошибки - 16.
Действия по воспроизведению Я могу проверить состояние для GoogleSignin.hasPlayServices ();и всплывающее окно, чтобы выбрать учетную запись.При выборе аккаунта отображается ошибка ОТМЕНЕННЫЙ код 16.
Ожидаемое поведение Возвращает информацию о пользователе.
Фактическое поведение выдает ошибку ОТМЕНЕННЫЙ код16.
Окружающая среда: 1.android / build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.1.0'
}
2.android / app / build.gradle:
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.pacelogin"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation (project(':react-native-google-signin')){
exclude group: "com.google.android.gms"
}
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.1.1"
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation "com.google.android.gms:play-services-basement:15.0.1"
}
Обновление: у меня есть рефери эта ссылка