My Android app's login to Google Play Games services seems to fail silently: after choosing the user in the sign-in activity, onActivityResult()
receives a resultCode
value of 10002. The Android APIs deposit these messages in the logcat:
W/SignInActivity(16216): onSignInFailed()...
W/SignInActivity(16216): Sign in failed during 6
W/SignInActivity(16216): ==> Returning non-OK result: 10002
while Log.w() commands I placed in onActivityResult()
deposit these messages:
W/Main activity(16167): In activity result with code 10002
W/Main activity(16167): activity result requests sign in
W/Main activity(16167): unsolved resolution
The strange thing is that it used to work, and when I try to debug it from Android Studio, login works perfectly every time , so I can't even debug the app!
Where can I get started debugging this?
I found the solution thanks to a problem with the same error but a completely different cause , but this situation is different in that it was caused by activating a feature in the Google Play Developer Console.
The keys to this particular error are that:
Back in May, Google introduced a feature wherein they sign your app in the Play Store . My original app was signed with the certificate generated by Android Studio, but Google seems pretty gung-ho about their signing so I switched to that without reading the fine print very carefully. As a result:
The solution is to:
At this point the deployed version worked for me like magic. No programming required!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.