Google Play 服务登录崩溃
Posted
技术标签:
【中文标题】Google Play 服务登录崩溃【英文标题】:Google Play Services Log In Crash 【发布时间】:2014-03-05 08:03:25 【问题描述】:我在使用 Google 的 Play 服务登录时遇到问题。 我有一台三星 S3,应用程序运行良好。我可以登录、解锁成就、发布高分等。
但我一直在其他一些设备上进行测试,例如三星 Galaxy Ace。对于该设备,当我第一次尝试登录时,它会提示我输入一个帐户(就像通常那样)。选择它并继续后,它说 com.google.android.gms 已崩溃。除了强制关闭它之外别无选择,应用程序只是挂在那里等待它返回到主应用程序。
查看日志猫发现这两个错误:
02-07 12:34:22.549: E/Database(1464): Error inserting real_time_support=false turn_based_support=false instance_game_id=1 installed=true platform_type=ANDROID package_name=com.ccs.pg preferred=true piracy_check=false
02-07 12:34:22.549: E/Database(1464): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1582)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1426)
02-07 12:34:22.549: E/Database(1464): at com.google.android.gms.games.provider.GamesContentProvider.a(SourceFile:1516)
02-07 12:34:22.549: E/Database(1464): at bbe.b(SourceFile:137)
02-07 12:34:22.549: E/Database(1464): at bbe.insert(SourceFile:116)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:214)
02-07 12:34:22.549: E/Database(1464): at bbe.a(SourceFile:337)
02-07 12:34:22.549: E/Database(1464): at bbe.applyBatch(SourceFile:306)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:229)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:95)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentResolver.applyBatch(ContentResolver.java:639)
02-07 12:34:22.549: E/Database(1464): at cmk.b(SourceFile:108)
02-07 12:34:22.549: E/Database(1464): at cmk.a(SourceFile:92)
02-07 12:34:22.549: E/Database(1464): at cmn.a(SourceFile:379)
02-07 12:34:22.549: E/Database(1464): at cmm.a(SourceFile:1944)
02-07 12:34:22.549: E/Database(1464): at dfm.a(SourceFile:106)
02-07 12:34:22.549: E/Database(1464): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:336)
02-07 12:34:22.549: E/Database(1464): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
02-07 12:34:22.549: E/Database(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 12:34:22.549: E/Database(1464): at android.os.Looper.loop(Looper.java:130)
02-07 12:34:22.549: E/Database(1464): at android.os.HandlerThread.run(HandlerThread.java:60)
02-07 12:34:22.549: W/dalvikvm(1464): threadid=13: thread exiting with uncaught exception (group=0x40018578)
还有这个:
02-07 12:34:22.589: E/AndroidRuntime(1464): android.database.sqlite.SQLiteException: Error occured while inserting real_time_support=false turn_based_support=false instance_game_id=1 installed=true platform_type=ANDROID package_name=com.ccs.pg preferred=true piracy_check=false to uri content://com.google.android.gms.games.background/game_instances/4f8b3b51
02-07 12:34:22.589: E/AndroidRuntime(1464): at com.google.android.gms.games.provider.GamesContentProvider.a(SourceFile:1695)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.b(SourceFile:137)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.insert(SourceFile:116)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:214)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.a(SourceFile:337)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.applyBatch(SourceFile:306)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:229)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:95)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentResolver.applyBatch(ContentResolver.java:639)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmk.b(SourceFile:108)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmk.a(SourceFile:92)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmn.a(SourceFile:379)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmm.a(SourceFile:1944)
02-07 12:34:22.589: E/AndroidRuntime(1464): at dfm.a(SourceFile:106)
02-07 12:34:22.589: E/AndroidRuntime(1464): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:336)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.Looper.loop(Looper.java:130)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.HandlerThread.run(HandlerThread.java:60)
据我所知,使用 SQLite 插入一些值存在问题,但据我所知,我无法控制该过程。 另外,我不确定“instance_game_id”这个值是做什么用的。
以前有没有人遇到过这个问题,知道如何解决或者有什么建议吗?
这是我尝试登录时记录的整个 logcat(包括 GameHelper 的 enableDebugLog)。
02-07 12:34:10.369: I/InputReader(162): dispatchTouch::touch event's action is 0
02-07 12:34:10.369: I/InputDispatcher(162): Delivering touch to current input target: action: 0, channel '408fc9c8 com.ccs.pg/com.ccs.pg.MainActivity (server)'
02-07 12:34:10.469: D/BatteryService(162): update start
02-07 12:34:10.469: D/BatteryService(162): update start
02-07 12:34:10.469: D/BatteryService(162): update start
02-07 12:34:10.479: I/InputReader(162): dispatchTouch::touch event's action is 1
02-07 12:34:10.479: I/InputDispatcher(162): Delivering touch to current input target: action: 1, channel '408fc9c8 com.ccs.pg/com.ccs.pg.MainActivity (server)'
02-07 12:34:10.889: D/GAME(1453): GameHelper: Starting USER-INITIATED sign-in flow.
02-07 12:34:10.889: D/GAME(1453): GameHelper: isGooglePlayServicesAvailable returned 0
02-07 12:34:10.889: D/GAME(1453): GameHelper: beginUserInitiatedSignIn: continuing pending sign-in flow.
02-07 12:34:10.889: D/GAME(1453): GameHelper: State change DISCONNECTED -> CONNECTING
02-07 12:34:10.899: D/GAME(1453): GameHelper: resolveConnectionResult: trying to resolve result: ConnectionResultstatusCode=SIGN_IN_REQUIRED, resolution=PendingIntent4050d4a8: android.os.BinderProxy@4057b408
02-07 12:34:10.899: D/GAME(1453): GameHelper: Result has resolution. Starting it.
02-07 12:34:10.899: D/PhoneWindow(1453): couldn't save which view has focus because the focused view com.badlogic.gdx.backends.android.surfaceview.GLSurfaceViewCupcake@40586b40 has no id.
02-07 12:34:10.899: I/ActivityManager(162): Starting: Intent flg=0x4000000 cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras) from pid -1
02-07 12:34:10.939: E/SensorManager(1453): unregisterListener:: all sensors, listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@4052e4a8
02-07 12:34:10.939: E/SensorHAL(162): +__poll_activate: handle=0 enabled=0
02-07 12:34:10.949: E/SensorHAL(162): > Accelerometer Write /sys/class/input/input3/enable 0
02-07 12:34:10.949: E/SensorManager(1453): unregisterListener:: all sensors, listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@40516fc8
02-07 12:34:10.949: E/SensorHAL(162): +__poll_activate: handle=1 enabled=0
02-07 12:34:10.949: I/AndroidInput(1453): sensor listener tear down
02-07 12:34:10.949: I/AndroidGraphics(1453): paused
02-07 12:34:10.969: I/ActivityManager(162): Start proc com.google.android.gms.ui for activity com.google.android.gms/.games.ui.signin.SignInActivity: pid=1526 uid=10016 gids=3003, 1015, 1006, 1007, 2001
02-07 12:34:11.109: I/MultiDex(1526): load(/data/app/com.google.android.gms-1.apk, forceReload=false)
02-07 12:34:11.249: I/MultiDex(1526): Need extracted file /data/data/com.google.android.gms/files/secondary-dexes/com.google.android.gms-1.apk.classes2.zip
02-07 12:34:11.249: I/MultiDex(1526): No extraction needed for /data/data/com.google.android.gms/files/secondary-dexes/com.google.android.gms-1.apk.classes2.zip of size 1502503
02-07 12:34:11.269: D/GCM(1370): GcmService start Intent act=com.google.android.gms.INITIALIZE pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService com.google.android.gms.INITIALIZE
02-07 12:34:11.289: W/dalvikvm(1526): VFY: unable to resolve virtual method 1383: Landroid/app/Activity;.invalidateOptionsMenu ()V
02-07 12:34:11.319: W/dalvikvm(1526): VFY: unable to resolve virtual method 2418: Landroid/os/Bundle;.getString (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
02-07 12:34:11.319: W/dalvikvm(1526): VFY: unable to resolve static field 899 (THREAD_POOL_EXECUTOR) in Landroid/os/AsyncTask;
02-07 12:34:11.319: E/dalvikvm(1526): Could not find class 'android.app.AppOpsManager', referenced from method bea.a
02-07 12:34:11.319: W/dalvikvm(1526): VFY: unable to resolve check-cast 325 (Landroid/app/AppOpsManager;) in Lbea;
02-07 12:34:11.459: I/ActivityManager(162): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +501ms
02-07 12:34:15.199: E/dalvikvm(1526): Could not find class 'android.os.UserManager', referenced from method asy.b
02-07 12:34:15.199: W/dalvikvm(1526): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:15.199: E/dalvikvm(1526): Could not find class 'android.os.UserManager', referenced from method asy.c
02-07 12:34:15.199: W/dalvikvm(1526): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:15.199: W/dalvikvm(1526): VFY: unable to resolve virtual method 1341: Landroid/accounts/AccountManager;.getAccountsByTypeForPackage (Ljava/lang/String;Ljava/lang/String;)[Landroid/accounts/Account;
02-07 12:34:15.199: E/dalvikvm(1526): Could not find class 'android.os.UserManager', referenced from method asy.d
02-07 12:34:15.199: W/dalvikvm(1526): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:15.209: I/ActivityManager(162): Starting: Intent act=com.google.android.gms.common.account.CHOOSE_ACCOUNT flg=0x20000000 cmp=com.google.android.gms/.common.account.AccountPickerActivity (has extras) from pid 1526
02-07 12:34:15.229: I/OrientationDebug(162): [pwm] in updateOrientationListenerLp()
02-07 12:34:15.229: V/OrientationDebug(162): in updateOrientationListenerLp(), Screen status=true, current orientation=-1, SensorEnabled=false
02-07 12:34:15.229: I/OrientationDebug(162): [pwm] needSensorRunningLp(), return false #3
02-07 12:34:15.229: W/ActivityManager(162): Trying to launch com.google.android.gms/.common.account.AccountPickerActivity
02-07 12:34:15.229: I/WindowManager(162): Setting rotation to 0, animFlags=1
02-07 12:34:15.239: I/ActivityManager(162): Config changed: scale=1.0 imsi=704/2 loc=es_US touch=3 keys=1/1/2 nav=1/1 orien=1 layout=18 uiMode=17 seq=22
02-07 12:34:15.419: I/ActivityManager(162): Displayed com.google.android.gms/.common.account.AccountPickerActivity: +198ms
02-07 12:34:15.459: D/GAME(1453): GameHelper: onStop, state = CONNECTING
02-07 12:34:15.469: D/GAME(1453): GameHelper: onStop: Killing connections
02-07 12:34:15.469: D/GAME(1453): GameHelper: killConnections: killing connections.
02-07 12:34:15.469: D/GAME(1453): GameHelper: killConnections: all clients disconnected.
02-07 12:34:15.469: D/GAME(1453): GameHelper: State change CONNECTING -> DISCONNECTED
02-07 12:34:16.489: W/PowerManagerService(162): Timer 0x3->0x3|0x0
02-07 12:34:17.609: I/InputReader(162): dispatchTouch::touch event's action is 0
02-07 12:34:17.609: I/InputDispatcher(162): Delivering touch to current input target: action: 0, channel '409fa2e8 com.google.android.gms/com.google.android.gms.common.account.AccountPickerActivity (server)'
02-07 12:34:17.659: I/InputReader(162): dispatchTouch::touch event's action is 1
02-07 12:34:17.659: I/InputDispatcher(162): Delivering touch to current input target: action: 1, channel '409fa2e8 com.google.android.gms/com.google.android.gms.common.account.AccountPickerActivity (server)'
02-07 12:34:18.969: I/InputReader(162): dispatchTouch::touch event's action is 0
02-07 12:34:18.969: I/InputDispatcher(162): Delivering touch to current input target: action: 0, channel '409fa2e8 com.google.android.gms/com.google.android.gms.common.account.AccountPickerActivity (server)'
02-07 12:34:19.049: I/InputReader(162): dispatchTouch::touch event's action is 1
02-07 12:34:19.049: I/InputDispatcher(162): Delivering touch to current input target: action: 1, channel '409fa2e8 com.google.android.gms/com.google.android.gms.common.account.AccountPickerActivity (server)'
02-07 12:34:19.099: I/OrientationDebug(162): [pwm] in updateOrientationListenerLp()
02-07 12:34:19.099: V/OrientationDebug(162): in updateOrientationListenerLp(), Screen status=true, current orientation=0, SensorEnabled=false
02-07 12:34:19.099: I/OrientationDebug(162): [pwm] needSensorRunningLp(), return false #3
02-07 12:34:19.099: I/WindowManager(162): Setting rotation to 1, animFlags=1
02-07 12:34:19.119: I/ActivityManager(162): Config changed: scale=1.0 imsi=704/2 loc=es_US touch=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=23
02-07 12:34:19.149: D/GAME(1453): GameHelper: onStart, state = DISCONNECTED
02-07 12:34:19.159: D/GAME(1453): GameHelper: onStart: Now connecting clients.
02-07 12:34:19.159: D/GAME(1453): GameHelper: Starting connections.
02-07 12:34:19.159: D/GAME(1453): GameHelper: State change DISCONNECTED -> CONNECTING
02-07 12:34:19.159: D/GAME(1453): GameHelper: connectNextClient: requested clients: 1, connected clients: 0
02-07 12:34:19.159: D/GAME(1453): GameHelper: Pending clients: 1
02-07 12:34:19.159: D/GAME(1453): GameHelper: Connecting GamesClient.
02-07 12:34:19.359: D/GAME(1453): GameHelper: onConnectionFailed
02-07 12:34:19.359: D/GAME(1453): GameHelper: Connection failure:
02-07 12:34:19.359: D/GAME(1453): GameHelper: - code: SIGN_IN_REQUIRED(4)
02-07 12:34:19.359: D/GAME(1453): GameHelper: - resolvable: true
02-07 12:34:19.359: D/GAME(1453): GameHelper: - details: ConnectionResultstatusCode=SIGN_IN_REQUIRED, resolution=PendingIntent405562f8: android.os.BinderProxy@4057b408
02-07 12:34:19.359: D/GAME(1453): GameHelper: onConnectionFailed: since user initiated sign-in, resolving problem.
02-07 12:34:19.359: D/GAME(1453): GameHelper: We're already expecting the result of a previous resolution.
02-07 12:34:19.479: I/ActivityManager(162): Start proc com.google.android.gsf.login for service com.google.android.gms/.auth.GetToken: pid=1536 uid=10016 gids=3003, 1015, 1006, 1007, 2001
02-07 12:34:19.669: I/MultiDex(1536): load(/data/app/com.google.android.gms-1.apk, forceReload=false)
02-07 12:34:19.829: I/MultiDex(1536): Need extracted file /data/data/com.google.android.gms/files/secondary-dexes/com.google.android.gms-1.apk.classes2.zip
02-07 12:34:19.829: I/MultiDex(1536): No extraction needed for /data/data/com.google.android.gms/files/secondary-dexes/com.google.android.gms-1.apk.classes2.zip of size 1502503
02-07 12:34:19.849: D/GCM(1370): GcmService start Intent act=com.google.android.gms.INITIALIZE pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService com.google.android.gms.INITIALIZE
02-07 12:34:19.879: W/dalvikvm(1536): VFY: unable to resolve virtual method 1508: Landroid/app/PendingIntent;.getCreatorPackage ()Ljava/lang/String;
02-07 12:34:19.879: W/dalvikvm(1536): VFY: unable to resolve virtual method 1509: Landroid/app/PendingIntent;.getCreatorUid ()I
02-07 12:34:19.989: E/dalvikvm(1536): Could not find class 'android.os.UserManager', referenced from method asy.b
02-07 12:34:19.989: W/dalvikvm(1536): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:19.989: E/dalvikvm(1536): Could not find class 'android.os.UserManager', referenced from method asy.c
02-07 12:34:19.989: W/dalvikvm(1536): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:19.989: W/dalvikvm(1536): VFY: unable to resolve virtual method 1341: Landroid/accounts/AccountManager;.getAccountsByTypeForPackage (Ljava/lang/String;Ljava/lang/String;)[Landroid/accounts/Account;
02-07 12:34:19.989: E/dalvikvm(1536): Could not find class 'android.os.UserManager', referenced from method asy.d
02-07 12:34:19.989: W/dalvikvm(1536): VFY: unable to resolve check-cast 532 (Landroid/os/UserManager;) in Lasy;
02-07 12:34:20.029: I/NotificationStore(1536): file does not exist: /data/data/com.google.android.gms/files/notification_data.dat
02-07 12:34:20.479: D/BatteryService(162): update start
02-07 12:34:20.479: D/BatteryService(162): update start
02-07 12:34:20.489: D/BatteryService(162): update start
02-07 12:34:22.399: I/global(1464): Loaded time zone names for en_US in 1189ms.
02-07 12:34:22.549: E/Database(1464): Error inserting real_time_support=false turn_based_support=false instance_game_id=1 installed=true platform_type=ANDROID package_name=com.ccs.pg preferred=true piracy_check=false
02-07 12:34:22.549: E/Database(1464): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1582)
02-07 12:34:22.549: E/Database(1464): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1426)
02-07 12:34:22.549: E/Database(1464): at com.google.android.gms.games.provider.GamesContentProvider.a(SourceFile:1516)
02-07 12:34:22.549: E/Database(1464): at bbe.b(SourceFile:137)
02-07 12:34:22.549: E/Database(1464): at bbe.insert(SourceFile:116)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:214)
02-07 12:34:22.549: E/Database(1464): at bbe.a(SourceFile:337)
02-07 12:34:22.549: E/Database(1464): at bbe.applyBatch(SourceFile:306)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:229)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:95)
02-07 12:34:22.549: E/Database(1464): at android.content.ContentResolver.applyBatch(ContentResolver.java:639)
02-07 12:34:22.549: E/Database(1464): at cmk.b(SourceFile:108)
02-07 12:34:22.549: E/Database(1464): at cmk.a(SourceFile:92)
02-07 12:34:22.549: E/Database(1464): at cmn.a(SourceFile:379)
02-07 12:34:22.549: E/Database(1464): at cmm.a(SourceFile:1944)
02-07 12:34:22.549: E/Database(1464): at dfm.a(SourceFile:106)
02-07 12:34:22.549: E/Database(1464): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:336)
02-07 12:34:22.549: E/Database(1464): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
02-07 12:34:22.549: E/Database(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 12:34:22.549: E/Database(1464): at android.os.Looper.loop(Looper.java:130)
02-07 12:34:22.549: E/Database(1464): at android.os.HandlerThread.run(HandlerThread.java:60)
02-07 12:34:22.549: W/dalvikvm(1464): threadid=13: thread exiting with uncaught exception (group=0x40018578)
02-07 12:34:22.589: E/(162): Dumpstate > /data/log/dumpstate_app_error
02-07 12:34:22.589: E/AndroidRuntime(1464): FATAL EXCEPTION: IntentService[SignInIntentService]
02-07 12:34:22.589: E/AndroidRuntime(1464): android.database.sqlite.SQLiteException: Error occured while inserting real_time_support=false turn_based_support=false instance_game_id=1 installed=true platform_type=ANDROID package_name=com.ccs.pg preferred=true piracy_check=false to uri content://com.google.android.gms.games.background/game_instances/4f8b3b51
02-07 12:34:22.589: E/AndroidRuntime(1464): at com.google.android.gms.games.provider.GamesContentProvider.a(SourceFile:1695)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.b(SourceFile:137)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.insert(SourceFile:116)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:214)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.a(SourceFile:337)
02-07 12:34:22.589: E/AndroidRuntime(1464): at bbe.applyBatch(SourceFile:306)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:229)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:95)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.content.ContentResolver.applyBatch(ContentResolver.java:639)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmk.b(SourceFile:108)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmk.a(SourceFile:92)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmn.a(SourceFile:379)
02-07 12:34:22.589: E/AndroidRuntime(1464): at cmm.a(SourceFile:1944)
02-07 12:34:22.589: E/AndroidRuntime(1464): at dfm.a(SourceFile:106)
02-07 12:34:22.589: E/AndroidRuntime(1464): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:336)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.Looper.loop(Looper.java:130)
02-07 12:34:22.589: E/AndroidRuntime(1464): at android.os.HandlerThread.run(HandlerThread.java:60)
02-07 12:34:25.049: W/PowerManagerService(162): Timer 0x3->0x3|0x0
02-07 12:34:26.269: D/VoldCmdListener(86): asec list
02-07 12:34:30.499: D/BatteryService(162): update start
02-07 12:34:30.509: D/BatteryService(162): update start
02-07 12:34:30.519: D/BatteryService(162): update start
【问题讨论】:
【参考方案1】:TL;DR:西班牙语配置的“应用名称”字段为空。
发现问题。错误不是代码本身,而是开发者控制台帐户的配置。
当您使用 Google Play 游戏服务时,您需要配置链接的应用程序详细信息。 因为我的应用程序支持西班牙语和英语,所以我为每种语言创建了一个配置。另外,我的手机 S3 的默认语言是英语,而我测试过的其他设备是西班牙语。
所以问题发生了,因为我没有为我的西班牙语配置的“应用程序名称”字段编写任何内容。 Android将其标记为错误(以红色突出显示),但由于英文版已填写该字段,最后它标记为没有错误并允许我继续测试。在 Play 游戏服务的主面板(带有检查的那个)中,如果没有使用其中一种语言配置,一切似乎都很好。
所以最终这就是 SQLite 存在约束问题的原因。它可能试图在其中一列上插入空值,而 GooglePlayGameServicesLibrary 没有检查空值。
【讨论】:
以上是关于Google Play 服务登录崩溃的主要内容,如果未能解决你的问题,请参考以下文章
Google Play 服务在 Android 2.3 Vision API 上崩溃
在 iOS 上创建实时房间后,Google Play 游戏服务崩溃