编程语言
首页 > 编程语言> > Bummer:尝试从helloAuthentication Android示例应用程序“ Ping Bluemix”出问题

Bummer:尝试从helloAuthentication Android示例应用程序“ Ping Bluemix”出问题

作者:互联网

有了help on this forum,我终于能够运行“ bms-samples-hellotodo-advanced”,它将MCA与Facebook身份验证结合使用.

我对使用带有Google身份验证的MCA的“ bms-samples-helloauthentication”仍然不满意.

我正在使用Genymotion模拟器使用Android Studio进行构建和调试.
我正在按照以下说明进行操作:

> bms-samples-android-helloauthentication README.md
> https://console.ng.bluemix.net/docs/services/mobileaccess/google-auth-android.html

一切都建立在没有警告或错误的情况下.我能够成功启动该应用程序.

但是,当我单击“ Ping Bluemix”时,该应用程序显示:Bummer:出了点问题

>我没有Google登录对话框
>我在Logcat中看不到任何错误或警告
>调试器显示我过去了pingBluemix()> new Request(BMSClient.getInstance().getBluemixAppRoute()“ / protected”,Request.GET).send(this,this);
>但我从未打过onActivityResult(),所以我再也没有机会致电GoogleAuthenticationManager.getInstance().onActivityResultCalled()
> cf日志helloAuthentication2显示:

2016-04-06T23:28:51.97-0700 [App / 0] OUT [2016-04-07 06:28:51.971] [ERROR] [默认]-缺少授权

问:如何解决并解决此问题?

问:有什么方法可以独立于运行Android应用程序而对MCA / Google身份验证进行故障排除?

喜欢·添加评论

解决方法:

非常感谢上面的James Young:

>不,我的Genymotion模拟器未安装Google Play服务.那就是问题所在.
>要安装Google Play服务,请执行以下操作:

a)点击浏览器

b)搜索Google Play服务apk

c)从Google Play安装(理想)或

d)在apkmirror.com上选择一个版本并手动安装
>安装Google Play服务后,“一切正常”.当我单击“ Ping Bluemix”时,出现了用于Google登录的对话框,并能够通过Bluemix成功进行身份验证.

再次谢谢你,詹姆斯!

标签:ibm-cloud,google-authentication,ibm-mobile-services,android
来源: https://codeday.me/bug/20191118/2031152.html