OAuth 同意屏幕为空白,加载图标在 android 应用中一直旋转,

OAuth consent screen is blank and loading icon keeps spinning forever in android app,

我创建了一个 Android 应用程序,我在其中访问 google 日历。 一周前它运行良好,但现在它没有显示 OAuth 同意屏幕,白色弹出窗口出现加载图标,并且一直在旋转。看截图

OAuth consent screen.

我得到的错误是

[com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException: needremoteconsent]

得到异常后我就这样开始intent

startActivityForResult(
((UserRecoverableAuthIOException) mLastError).getIntent(),
Conn_frag_google.REQUEST_AUTHORIZATION);

但 OAuth 同意屏幕未显示,加载标志一直旋转。

我用Google Console解决了这个问题。配置 OAuth 同意屏幕 后,添加“正确的范围”并等待 Google 验证我的更改“UserRecoverableAuthIOException:NeedRemoteConsent”消失,一切开始工作!

更新:它也适用于“发布状态:测试”