【问题标题】:Android Google authentication Error in Android studio deviceAndroid Studio 设备中的 Android Google 身份验证错误
【发布时间】:2021-01-18 05:30:20
【问题描述】:

尝试使用 Google 身份验证登录我的 Android 应用程序时出现错误 12501。当我在 Android Studio 设备中运行该应用程序时出现此错误,但是当我在自己的手机上安装已签名的 apk 时,一切正常。 我正在使用使用 Android Studio 指纹签名的新 Android 客户端 ID。

这是我的 google-services.json oauth_client 部分:

 "oauth_client": [
        {
          "client_id": "223...-...j2s5.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.example.ucango_2021",
            "certificate_hash": "644d..."
          }
        },
        {
          "client_id": "223...-...esuke.apps.googleusercontent.com",
          "client_type": 3
        }
      ],

请求创建方法:

 // Configure Google Sign In
        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestEmail()
                .build();

        // Build a GoogleSignInClient with the options specified by gso.
        mGoogleSignInClient = GoogleSignIn.getClient(this, gso);

【问题讨论】:

    标签: android firebase google-signin


    【解决方案1】:

    检查是否存在 -> 应用程序 -> -> 调试 -> 值 -> values.xml。 如果是的话改变。在调试模式下使用地图 api 对我有用 我希望我帮助了你

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-04
      相关资源
      最近更新 更多