06-06 12:30:46.353: D/BaseGameActivity(7982): isGooglePlayServicesAvailable returned 0 06-06 12:30:46.353: D/BaseGameActivity(7982): beginUserInitiatedSignIn: starting new sign-in flow. 06-06 12:30:46.416: D/BaseGameActivity(7982): Connecting GamesClient. 06-06 12:30:46.424: D/BaseGameActivity(7982): onStart. 06-06 12:30:46.424: D/BaseGameActivity(7982): onStart: connecting clients. 06-06 12:30:46.424: D/BaseGameActivity(7982): Connecting GamesClient. 06-06 12:30:46.424: E/GmsClient(7982): Calling connect() while still connected,missing disconnect(). 06-06 12:30:46.713: D/BaseGameActivity(7982): onConnectionFailed: result 4 06-06 12:30:46.713: D/BaseGameActivity(7982): onConnectionFailed: since user initiated sign-in,trying to resolve problem. 06-06 12:30:46.713: D/BaseGameActivity(7982): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_required,resolution=PendingIntent{41692200: android.os.BinderProxy@416921a0}} 06-06 12:30:46.713: D/BaseGameActivity(7982): result has resolution. Starting it. 06-06 12:30:46.900: D/BaseGameActivity(7982): onActivityResult,req 9001 response 0 06-06 12:30:46.900: D/BaseGameActivity(7982): responseCode != RESULT_OK,so not reconnecting. 06-06 12:30:46.900: D/BaseGameActivity(7982): giveUp: giving up on connection. Status code: 4 06-06 12:30:46.900: D/BaseGameActivity(7982): Making error dialog for error: 4
com.google.android.gms会记录以下错误:
E/SignInActivity(7432): SignInActivity must be started with startActivityForResult
我做了什么:
>我已经正确配置了开发者控制台. SHA1是正确的(匹配androiddebug密钥库).
>在API控制台中,一切都看起来不错.
>我扩展了GameBaseActivity并实现了请求的接口.
>我的值文件夹中有一个ids.xml与开发者控制台中的ids.xml匹配.
>我已经覆盖了所请求的方法,包括onActivityResult()
>清单也可以,它包括请求的元数据.
>这是我用于登录onCreate的代码:
setSignInMessages("SIGNING IN","SIGNING OUT"); beginUserInitiatedSignIn();
当测试示例Button Clicker 2000时,我也有未知错误,并修正它正确配置仪表板.当前的游戏仪表板也配置正确,所以我真的不知道发生了什么.
我失踪了什么
编辑:
>我也尝试解开BaseGameActivity并实现GameHelper
直接在我的主要活动.
>我尝试发布应用程序游戏设置(因为这个游戏已经在Play Store上发布).使用我的发布签名SHA1键链接另一个应用程序.设置为主要应用程序进行安装.还没有运气
解决方法
SignInActivity确实在代码中不可见,因为您通过调用GameHelper.resolveConnectionResult来启动它,它将调用mConnectionResult.startResolutionForResult(mActivity,RC_RESOLVE).这是mConnectionResult,它具有将启动SignInActivity的Intent.而BaseGameActivity的日志表示您正确启动它,因此除了在BaseGameActivity和GameHelper中进行了一些更改之外,错误很奇怪.
你在哪里找错?在你的包过滤器?真正有用的信息显示在LogCat中,但不在您的应用程序过滤器中.在LogCat中查找所有没有过滤器的消息,并搜索标签Volley和GameAgent.它可能会显示一些错误.