错误:状态{statusCode = DEVELOPER

编程入门 行业动态 更新时间:2024-10-25 11:29:38
本文介绍了错误:状态{statusCode = DEVELOPER_ERROR,分辨率=空}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用gplus登录,并且在进入onActivityResult时收到此错误....

I am usign gplus sign in, and getting this error at time I am in onActivityResult....

@Override public 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.在按动按钮时,将执行以下代码....

And I am calling for gplus login on button click. On clcking button following code is executed....

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);

我正在解决这个错误...

And I am geetng this error...

Status{statusCode=DEVELOPER_ERROR, resolution=null}

在此行上....

GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);

请提出解决方案.

推荐答案

您需要将SHA1密钥添加到Firebase控制台配置中. 您可以通过以下方式做到这一点:

You need to add your SHA1 key to firebase console configuration. You can do it in this way:

Firebase控制台( console.firebase.google )->您的项目- >配置->滚动到

Firebase console ( console.firebase.google ) -> your project -> configuration -> scroll to

您可以在Android Studio中找到运行签名报告"的SHA1密钥:

You can find your SHA1 key running "Signing report" from Android Studio:

然后,查看运行选项卡"并单击按钮:

Then, look the "run tab" and click the button:

我认为这是更简单的方法.希望有帮助.

I think it's the easier way. Hope this help.

更多推荐

错误:状态{statusCode = DEVELOPER

本文发布于:2023-11-26 15:23:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634262.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:状态   错误   DEVELOPER   statusCode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!