問題描述
Google Play 服務登錄錯誤 (Google Play Services sign in error)
I have been trying to run the example named buttonclicker2000: I set up everything and it works on a real device. But on the emulator 4.2.2 when trying to sign in i get an unknown error.
here is the logcat Can anyone help me out here?
07‑17 20:40:41.293: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 20:40:50.233: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 20:40:51.743: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 20:40:51.873: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 20:41:03.104: E/Volley(748): [91] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07‑17 20:41:03.294: I/Choreographer(1780): Skipped 38 frames! The application may be doing too much work on its main thread.
07‑17 20:41:03.384: I/Choreographer(1348): Skipped 54 frames! The application may be doing too much work on its main thread.
07‑17 20:41:03.554: E/Volley(748): [91] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07‑17 20:41:03.614: E/SignInIntentService(748): Access Not Configured
07‑17 20:41:03.614: E/SignInIntentService(748): aol
07‑17 20:41:03.614: E/SignInIntentService(748): at ajy.a(SourceFile:108)
07‑17 20:41:03.614: E/SignInIntentService(748): at abm.a(SourceFile:213)
07‑17 20:41:03.614: E/SignInIntentService(748): at abm.a(SourceFile:194)
07‑17 20:41:03.614: E/SignInIntentService(748): at aav.a(SourceFile:486)
07‑17 20:41:03.614: E/SignInIntentService(748): at aqu.a(SourceFile:221)
07‑17 20:41:03.614: E/SignInIntentService(748): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
07‑17 20:41:03.614: E/SignInIntentService(748): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07‑17 20:41:03.614: E/SignInIntentService(748): at android.os.Handler.dispatchMessage(Handler.java:99)
07‑17 20:41:03.614: E/SignInIntentService(748): at android.os.Looper.loop(Looper.java:137)
07‑17 20:41:03.614: E/SignInIntentService(748): at android.os.HandlerThread.run(HandlerThread.java:60)
07‑17 20:41:04.594: I/Choreographer(580): Skipped 76 frames! The application may be doing too much work on its main thread.
07‑17 20:41:05.063: D/ButtonClicker2000(1780): Sign‑in failed.
07‑17 20:41:05.083: I/Choreographer(1780): Skipped 189 frames! The application may be doing too much work on its main thread.
07‑17 20:41:05.443: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 20:41:05.613: I/Choreographer(1780): Skipped 127 frames! The application may be doing too much work on its main thread.
07‑17 20:41:06.853: D/dalvikvm(1348): GC_EXPLICIT freed 83K, 36% free 2605K/4040K, paused 5ms+8ms, total 701ms
07‑17 20:41:06.863: E/StrictMode(1348): class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07‑17 20:41:06.863: E/StrictMode(1348): android.os.StrictMode$InstanceCountViolation: class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07‑17 20:41:06.863: E/StrictMode(1348): at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
EDIT Full logcat, signout from all other devices from everywhere
07‑17 22:01:00.997: I/ActivityManager(296): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid ‑1
07‑17 22:01:01.007: W/WindowManager(296): Failure taking screenshot for (246x410) to layer 21010
07‑17 22:01:01.187: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 22:01:01.367: I/Choreographer(1266): Skipped 86 frames! The application may be doing too much work on its main thread.
07‑17 22:01:01.737: I/Choreographer(1283): Skipped 45 frames! The application may be doing too much work on its main thread.
07‑17 22:01:01.937: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 22:01:01.948: I/Choreographer(296): Skipped 78 frames! The application may be doing too much work on its main thread.
07‑17 22:01:02.007: I/Choreographer(296): Skipped 41 frames! The application may be doing too much work on its main thread.
07‑17 22:01:02.018: I/Choreographer(1283): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:02.547: I/Choreographer(296): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:02.557: I/ActivityManager(296): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +1s313ms
07‑17 22:01:02.627: I/Choreographer(1283): Skipped 95 frames! The application may be doing too much work on its main thread.
07‑17 22:01:02.687: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:03.237: I/Choreographer(1283): Skipped 65 frames! The application may be doing too much work on its main thread.
07‑17 22:01:03.287: I/Choreographer(1266): Skipped 67 frames! The application may be doing too much work on its main thread.
07‑17 22:01:03.627: I/Choreographer(1266): Skipped 87 frames! The application may be doing too much work on its main thread.
07‑17 22:01:03.817: I/Choreographer(1266): Skipped 48 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.057: I/Choreographer(1266): Skipped 37 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.107: I/Choreographer(1283): Skipped 51 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.237: I/Choreographer(1266): Skipped 41 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.267: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.417: I/Choreographer(1266): Skipped 47 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.507: I/Choreographer(1283): Skipped 41 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.597: I/Choreographer(1266): Skipped 43 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.727: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07‑17 22:01:04.867: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.058: I/Choreographer(1283): Skipped 38 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.197: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.217: I/Choreographer(1266): Skipped 34 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.377: I/Choreographer(1283): Skipped 49 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.547: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.697: D/dalvikvm(296): GC_CONCURRENT freed 683K, 56% free 5765K/13000K, paused 59ms+182ms, total 1675ms
07‑17 22:01:05.717: I/Choreographer(1283): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.807: I/Choreographer(1266): Skipped 30 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.877: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:05.947: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07‑17 22:01:06.017: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07‑17 22:01:06.087: I/Choreographer(1266): Skipped 33 frames! The application may be doing too much work on its main thread.
07‑17 22:01:06.177: I/Choreographer(1283): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:06.317: I/Choreographer(1283): Skipped 36 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.048: I/Choreographer(1283): Skipped 35 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.307: I/Choreographer(1283): Skipped 39 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.397: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.527: I/Choreographer(1283): Skipped 53 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.547: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.697: I/Choreographer(1266): Skipped 42 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.728: I/Choreographer(1283): Skipped 51 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.837: I/Choreographer(1266): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.877: D/dalvikvm(716): GC_CONCURRENT freed 333K, 12% free 3432K/3892K, paused 8ms+145ms, total 589ms
07‑17 22:01:07.948: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07‑17 22:01:07.987: I/Choreographer(1266): Skipped 37 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.118: I/Choreographer(1283): Skipped 43 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.327: I/Choreographer(1283): Skipped 53 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.627: I/Choreographer(1266): Skipped 41 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.698: I/Choreographer(1283): Skipped 39 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.847: I/Choreographer(1266): Skipped 55 frames! The application may be doing too much work on its main thread.
07‑17 22:01:08.987: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.127: I/Choreographer(1266): Skipped 45 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.237: I/Choreographer(1283): Skipped 49 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.297: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.397: I/Choreographer(1283): Skipped 41 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.427: E/Volley(716): [76] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07‑17 22:01:09.447: I/Choreographer(1266): Skipped 32 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.537: I/Choreographer(1283): Skipped 36 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.687: E/Volley(716): [76] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
07‑17 22:01:09.777: E/SignInIntentService(716): Access Not Configured
07‑17 22:01:09.777: E/SignInIntentService(716): aol
07‑17 22:01:09.777: E/SignInIntentService(716): at ajy.a(SourceFile:108)
07‑17 22:01:09.777: E/SignInIntentService(716): at abm.a(SourceFile:213)
07‑17 22:01:09.777: E/SignInIntentService(716): at abm.a(SourceFile:194)
07‑17 22:01:09.777: E/SignInIntentService(716): at aav.a(SourceFile:486)
07‑17 22:01:09.777: E/SignInIntentService(716): at aqu.a(SourceFile:221)
07‑17 22:01:09.777: E/SignInIntentService(716): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
07‑17 22:01:09.777: E/SignInIntentService(716): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07‑17 22:01:09.777: E/SignInIntentService(716): at android.os.Handler.dispatchMessage(Handler.java:99)
07‑17 22:01:09.777: E/SignInIntentService(716): at android.os.Looper.loop(Looper.java:137)
07‑17 22:01:09.777: E/SignInIntentService(716): at android.os.HandlerThread.run(HandlerThread.java:60)
07‑17 22:01:09.917: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:09.967: I/Choreographer(1283): Skipped 55 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.107: I/Choreographer(1266): Skipped 44 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.187: E/LoadSelfFragment(1283): Unable to sign in ‑ application does not have a registered client ID
07‑17 22:01:10.197: W/WindowManager(296): Failure taking screenshot for (246x410) to layer 21020
07‑17 22:01:10.227: I/Choreographer(1283): Skipped 65 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.267: I/Choreographer(1266): Skipped 40 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.408: I/Choreographer(1266): Skipped 38 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.537: I/Choreographer(1266): Skipped 39 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.937: I/Choreographer(1283): Skipped 184 frames! The application may be doing too much work on its main thread.
07‑17 22:01:10.947: I/Choreographer(689): Skipped 127 frames! The application may be doing too much work on its main thread.
07‑17 22:01:11.087: I/Choreographer(1283): Skipped 31 frames! The application may be doing too much work on its main thread.
07‑17 22:01:11.497: D/dalvikvm(1266): GC_CONCURRENT freed 425K, 12% free 4125K/4676K, paused 7ms+143ms, total 651ms
07‑17 22:01:11.788: D/ButtonClicker2000(1266): Sign‑in failed.
07‑17 22:01:11.837: I/Choreographer(1266): Skipped 333 frames! The application may be doing too much work on its main thread.
07‑17 22:01:12.057: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
07‑17 22:01:12.197: I/Choreographer(1266): Skipped 79 frames! The application may be doing too much work on its main thread.
07‑17 22:01:13.017: D/dalvikvm(1283): GC_EXPLICIT freed 65K, 13% free 2535K/2904K, paused 5ms+154ms, total 442ms
07‑17 22:01:13.067: E/StrictMode(1283): class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07‑17 22:01:13.067: E/StrictMode(1283): android.os.StrictMode$InstanceCountViolation: class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
07‑17 22:01:13.067: E/StrictMode(1283): at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
參考解法
方法 1:
I have encountered this error in the past ‑ I'm just struggling to be absolutely certain what caused it:
class com.google.android.gms.games.ui.signin.SignInActivity; instances=2; limit=1
I am fairly certain that it is because you are already signed on with that account on another device or emulator. I didn't have to do anything significant to fix the problem ‑ sign out from the other device or use a different account. By the way if you do use a different account make sure it is defined as a tester for the game.
Update: I've just seen the full logcat and I see that this message precedes the one we have been focusing on:
Unable to sign in ‑ application does not have a registered client ID
Your app_id must be set to the first 12 bytes of the client id from the developer console. This stuff is all well‑documented by Google e.g.:
https://developers.google.com/games/services/console/enabling
https://developers.google.com/live/shows/5936979195723776
If it is working on a real device and not an emulator then please also check that you have set up an emulator that contains the Google APIs.
Update:
You've now posted a different logcat ? Anyway, if you are still getting the client ID message please check that you do not have two different app_id values in your app (e.g. one in strings.xml and one in ids.xml )