googleSignInStatus =状态{statusCode =未知状态码:12501,分辨率=空}
弹出式屏幕截图:
override fun onCreate(savedInstanceState: Bundle?) {
val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestServerAuthCode(getString(R.string.server_client_id))
.build()
mGoogleApiClient = GoogleApiClient.Builder(this)
.enableAutoManage(this, this)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build()
mGoogleApiClient?.registerConnectionFailedListener(this)
} //Code that is used to init sign in client
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == RC_SIGN_IN) {
val result = Auth.GoogleSignInApi.getSignInResultFromIntent(data)
Timber.tag("TRY_TO_HANDLE").d(data.extras?.toString())
Timber.tag("TRY_TO_HANDLE").d(result.status.toString())
Timber.tag("TRY_TO_HANDLE").d(result.status.statusMessage)
}} //Code that handle result
//googleSignInStatus=
Status{statusCode=unknown status code: 12501, resolution=null}
答案 0 :(得分:0)
您是否尝试过删除帐户,然后使用再次尝试注册。
mClient.clearDefaultAccountAndReconnect()