几个月前,我的谷歌登录程序工作没有问题,但今天模拟器在 Logcat 中回复我这个错误:
\nE/Auth:[GoogleAccountDataServiceImpl] getToken() -> NEED_REMOTE_CONSENT。应用程序:com_pro.bandweb.mycpstore,服务:oauth2:email https://www.googleapis.com/auth/spreadsheets.readonly openid 配置文件
\n尝试在谷歌中查找,但我没有找到任何建议...这是我用于 sigIn 的代码:
\npublic void InitGoogle() throws IOException {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestScopes(new Scope(SPREADSHEETS_SCOPE))\n .requestEmail()\n .build();\n googleSignInClient = com.google.android.gms.auth.api.signin.GoogleSignIn.getClient(this, gso);\n\n if (GoogleSignIn.getLastSignedInAccount(this) == null) {\n Log.v(TAG, "getting sign-on again");\n //startActivityForResult(googleSignInClient.getSignInIntent(), RC_SIGN_IN);\n SignInActivityResult.launch(googleSignInClient.getSignInIntent());\n } else {\n Log.v(TAG, "sign-on is still good, reusing");\n\n //faccio la richiesta solo se \xc3\xa8 stato inserito il foglio di google shhet nelle preferenze, altrimenti avviso\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n if (!sharedPreferences.contains(getString(R.string.pref_googleSheetId_key))\n || …Run Code Online (Sandbox Code Playgroud)