我正在使用gplus登录,并且当我在onActivityResult时遇到此错误….
@OverrIDepublic voID onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); callbackManager.onActivityResult(requestCode, resultCode, data); clIEnt.onActivityResult(requestCode, resultCode, data); if (requestCode == 0) { GoogleSignInResult result = Auth.GoogleSignInAPI.getSignInResultFromIntent(data); if (result.isSuccess()) { GoogleSignInAccount acct = result.getSignInAccount();// Log.d("Result","details"+ acct.getdisplayname() + acct.getEmail()); mEmail = acct.getEmail(); String mFullname = acct.getdisplayname(); String mGoogleplusID = acct.getID(); SocialUser user = new SocialUser(); user.setType("Googleplus"); user.setEmail(mEmail); user.setFullname(mFullname); user.setID(mGoogleplusID + ""); loginParams.put("email_ID", mEmail); loginParams.put("GooglePlusID", mGoogleplusID); loginParams.put("full_name", mFullname); loginParams.put("registrationType", "Googleplus"); SignUpService(user); } else { Toast.makeText(CustomerLogIn.this, "Unable to fetch data, Proceed manually", Toast.LENGTH_SHORT).show(); } }}
我要求按钮点击gplus登录.在按下代码后执行代码….
GoogleSignInoptions GoogleSignInoptions = new GoogleSignInoptions.Builder(GoogleSignInoptions.DEFAulT_SIGN_IN) .requestemail() .build(); mGoogleapiclient = new Googleapiclient.Builder(CustomerLogIn.this) .addAPI(Auth.Google_SIGN_IN_API, GoogleSignInoptions) .build(); Intent signInIntent = Auth.GoogleSignInAPI.getSignInIntent(mGoogleapiclient); startActivityForResult(signInIntent, 0);
而且我发现了这个错误……
Status{statusCode=DEVELOPER_ERROR, resolution=null}
在这条线上….
GoogleSignInResult result = Auth.GoogleSignInAPI.getSignInResultFromIntent(data);
请建议解决方案.
解决方法:
您需要将SHA1密钥添加到firebase控制台配置.
你可以这样做:
Firebase控制台(https://console.firebase.google.com) – >你的项目 – >配置 – >滚动到
您可以在AndroID Studio中找到运行“登录报告”的SHA1密钥:
然后,查看“运行选项卡”并单击按钮:
我认为这是更简单的方法.希望这有帮助.
总结以上是内存溢出为你收集整理的android – 错误:状态{statusCode = DEVELOPER_ERROR,resolution = null}全部内容,希望文章能够帮你解决android – 错误:状态{statusCode = DEVELOPER_ERROR,resolution = null}所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)