Google登录生产环境出现ApiException 10问题求助
Google登录ApiException 10问题求助
报错信息
PlatformException(sign_in_failed com.google.android.gms.common.api.ApiException 10: null, null
已完成的配置与排查
- 已在Firebase控制台配置应用签名的SHA-1和SHA-256
- 已在Google OAuth中添加Android密钥,包名配置正确
- OAuth consent设置无误
- 问题仅出现在内部应用共享或Google Play渠道,模拟器和直接安装APK时登录正常
项目build.gradle配置
plugins { id "com.android.application" // START: FlutterFire Configuration id 'com.google.gms.google-services' // END: FlutterFire Configuration id "kotlin-android" // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } def flutterVersionCode = localProperties.getProperty("flutter.versionCode") ?: "1" def flutterVersionName = localProperties.getProperty("flutter.versionName") ?: "1.0" android { namespace = "com.mindfactory.aparta_me" compileSdk = 34 ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } defaultConfig { applicationId = "com.mindfactory.aparta_me" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName minSdkVersion 23 } signingConfigs { debug { keyAlias 'androiddebugkey' keyPassword 'android' storeFile file('debug.keystore') storePassword 'android' } } buildTypes { debug { signingConfig signingConfigs.debug } release { minifyEnabled false shrinkResources false } } } flutter { source = "../.." } dependencies { implementation 'com.google.android.gms:play-services-auth:20.7.1' }
已尝试重新配置应用签名凭证,问题仍未解决,恳请技术支持。
内容的提问来源于stack exchange,提问作者Karen Lettieri
相关产品推荐
相关产品推荐

