错误:状态{statusCode = DEVELOPER_ERROR,分辨率=空} [英] Error: Status{statusCode=DEVELOPER_ERROR, resolution=null}

查看:249
本文介绍了错误:状态{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控制台( https://console.firebase.google.com )->您的项目- >配置->滚动到

Firebase console ( https://console.firebase.google.com ) -> 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_ERROR,分辨率=空}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆