我未使用Firebase进行Google登录。因为StackOverflow中的大多数类似问题都与之有关。
问题:
在handleSignInResult()
中,我收到一个开发人员错误(com.google.android.gms.common.api.ApiException:10)
build.gradle:
// The dependencies i am using
implementation 'com.google.android.gms:play-services-auth:17.0.0'
内部片段:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder()
.requestId()
.requestEmail()
.requestServerAuthCode("MY_WEB_CLIENT_ID")
.requestScopes(new Scope("https://www.googleapis.com/auth/calendar.readonly")) // read-write to calendars
.requestScopes(new Scope("https://www.googleapis.com/auth/calendar.events.readonly")) // read-write to events
.build();
mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);
iOS应用程序中使用了相同的WEB_CLIENT_ID,并且运行良好。因此,谷歌云设置很好。
我已经尝试过(但不起作用)的东西:
google-service.json