- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在选择 Google 帐户后收到此错误。 OnActivityResult 被调用,但在评估结果后抛出此错误。原因不是 SHA1 错误,我使用相同的 key 进行发布和调试。该应用程序不是来自 Google Play。我没有使用 firebase。 Google 登录示例使用相同的 key 。
com.google.android.gms.common.api.ApiException:12500:
堆栈跟踪:
W/System.err: com.google.android.gms.common.api.ApiException: 12500:
W/System.err: at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source)
W/System.err: at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)
W/System.err: at de.org.limindo.limindo2.fragLogin.onActivityResult(fragLogin.java:412)
W/System.err: at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:151)
W/System.err: at de.org.limindo.limindo2.MainActivity.onActivityResult(MainActivity.java:788)
W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:5456)
W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:3549)
W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3596)
W/System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:151)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1369)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:110)
W/System.err: at android.os.Looper.loop(Looper.java:193)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5299)
W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
W/System.err: at dalvik.system.NativeStart.main(Native Method)
代码是:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(fragLogin.this._main, gso);
mSignInGoogle0.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View view)
{
Intent signInIntent = mGoogleSignInClient.getSignInIntent();
startActivityForResult(signInIntent, RC_SIGN_IN);
}
});
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
// Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);
if (requestCode == RC_SIGN_IN) {
// The Task returned from this call is always completed, no need to attach
// a listener.
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
handleSignInResult(task);
}
}
private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {
try {
GoogleSignInAccount account = completedTask.getResult(ApiException.class);
// Signed in successfully, show authenticated UI.
if (account != null)
{
mPasswordView.setVisibility(View.GONE);
mPasswordView.setVisibility(View.GONE);
}
updateUI(account);
} catch (ApiException e) {
e.printStackTrace();
// The ApiException status code indicates the detailed failure reason.
// Please refer to the GoogleSignInStatusCodes class reference for more information.
Log.w(TAG, "signInResult:failed code=" + e.getStatusCode());
lib.ShowMessage(getContext(), getString(R.string.googleloginnotsuccessfull) + "\n" + getString(R.string.ErrorCode) + GoogleSignInStatusCodes.getStatusCodeString(e.getStatusCode()) + ":" + e.getStatusCode(), getString(R.string.Error));
updateUI(null);
}
}
最佳答案
如果这对任何人有帮助:我就处于这种情况,只是它最初有效,后来停止工作。我终于意识到这是因为我换了笔记本电脑。
关于java - Google 登录错误 12500 SHA1 双重检查 GoogleSignInAccount account =completedTask.getResult(ApiException.class);,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53287131/
OnActivityResult if (requestCode == RC_SIGN_IN) { Task task =
我正在尝试通过游戏服务在 Play 商店中的游戏中实现排行榜。 我很难实现这个。我不是专家。我要补充的是,该游戏是用 HTML、CSS、javascript 制作的。我已经在控制台中生成了排行榜ID。
我正在尝试使用最新的 Google API。 我按照 Google 的建议设置了所有依赖项。 编译 'com.google.android.gms:play-services:9.0.0' 并且还创建
在我的 Android 应用程序中,为了通过 google 帐户 进行身份验证,我遵循了这个官方教程 https://developers.google.com/identity/sign-in/an
嘿,我正在使用 Firebase 身份验证并启用了 Google 登录 功能。Google 登录运行良好,我获得了所有信息。但是当我想将用户保存在 Firebase 用户列表中时,getIdToken
我正在关注 this在我的应用程序中集成谷歌身份验证。它在调试 apk 中运行良好,但在发布时,每次都失败。 我已经在云平台上注册了 debug 和 relese SHA-1 key 。 引用代码 f
Plus.PeopleApi.load(mGoogleApiClient, googleUser.getId()).setResultCallback(new ResultCallback() {
正在尝试从已登录的个人资料中获取照片。但总是返回空值。姓名和电子邮件返回值,只有照片有问题。 GoogleSignInOptions gso = new GoogleSignInOptions.Bui
播放服务的最新版本 (8.3) 存在与 GoogleSignInAccount 相关的问题。 我们收到了由此产生的崩溃。这是堆栈跟踪。 Android: 4.4.4 Manufacturer: Son
我在选择 Google 帐户后收到此错误。 OnActivityResult 被调用,但在评估结果后抛出此错误。原因不是 SHA1 错误,我使用相同的 key 进行发布和调试。该应用程序不是来自 Go
我是一名优秀的程序员,十分优秀!