Im having trouble with Google's Play Services Log In.
I have a Samsung S3 and the application runs jsut fine. I can login, unlock achievementens, post highscores, etc.
But I have been testing on some other devices, like the Samsung Galaxy Ace. For that device, when I try to log in for the first time it prompts me for an account (like it would normally do). After selecting it and proceeding, it says com.google.android.gms has crashed. There is no other option other than closing it forcefully and the application just hangs there waiting until it returns to the main app.
Checking the log cat I found this two errors:
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)
And This one:
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)
From what I can tell, there is a problem inserting some values using SQLite, but as far as I know I have no control over that process.
Also, im not sure what the value "instance_game_id" is used for.
Has anybody had this problem before, knows how to fix it or has any suggestion?
Here is the whole logcat recorded from the moment I try to sign in (incluiding the enableDebugLog for GameHelper).
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: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{4050d4a8: 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: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{405562f8: 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
TL;DR: The "Name of the app" field for the Spanish configuration was empty.
Found the problem. The error wasnt on the code itself, it was on the configuration of the developer console account.
When you make use of the Google Play Game Services you need to configure the Linked App Details.
Because my app is available on both Spanish and English I created a configuration for each language. Also, my phone, the S3 has its default language on English, while the other devices I tested it on where on Spanish.
So the problem occurred because I hadn't written anything for the "Name of the app" field for my Spanish configuration. Android marked it as an error (highlighted in red), but because the English version had that field filled, in the end it marked no error and allowed me to continue testing. In the main panel of the Play Game Services (the one with the checks) everything seemed fine when it wasn't with one of the language configurations.
So in the end that's why SQLite had a constraint problem. It probably was trying to insert a null value on one of its columns and the GooglePlayGameServicesLibrary thingy didn't check for null values.
Related
Using a Zebra MC3300 Device with Datawedge 8.0 +
I've been working on a scanning app that requires me to scan an RFID in step one and immediately scan a barcode in step two. The process is repeated to link the RFID and barcode in the DB. I've developed the app using the data wedge API but the scan is failed after a couple of scans the RFID scan doesn't scan anymore even though it is enabled and whether enable/disable the profile, restarting the app doesn't help either. When this happens I have to restart the device completely to get it to work again.
From the logs, I observed some sort of crashes and messages that I think might be helpful in understanding the issue. Any help is appreciated.
Thanks in advance.
02-07 19:19:06.021 724 724 I ScannerFramework: [Scanner::ScannerOpen] 'ScannerOpen' called, Calling process pid '1551', package name 'com.symbol.datawedge'
02-07 19:19:06.021 724 724 E ScannerFramework: [StackAdapter::ScannerOpen] User exists but Scanner not initialized
02-07 19:19:06.023 724 724 I ScannerFramework: [Scanner::ScannerOpen] - '0'
02-07 19:19:06.028 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:06.252 528 528 I chatty : uid=1000(system) /system/bin/surfaceflinger identical 87 lines
02-07 19:19:06.252 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:06.262 1168 1183 D ActivityTrigger: ActivityTrigger activityStopTrigger
02-07 19:19:06.266 724 1016 I ScannerFramework: [Scanner::IsScannerConnected] 'IsScannerConnected' called, Calling process pid '1551'
02-07 19:19:06.266 724 1016 I ScannerFramework: [Scanner::IsScannerConnected] - '1'
02-07 19:19:06.266 724 1169 I ScannerFramework: [564:280][Scanner::ScannerEnable] 'ScannerEnable' called, Calling process pid '1551'
02-07 19:19:06.275 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:06.415 528 528 I chatty : uid=1000(system) /system/bin/surfaceflinger identical 23 lines
02-07 19:19:06.415 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:06.478 724 1169 I imgdec : OCRVersionString 1.6.5.11
02-07 19:19:06.478 724 1169 I imgdec : DecOpen ImgKit IMGKIT_8.03T01.26
02-07 19:19:06.490 724 1169 I ScannerFramework: [StateMachine::MoveState] Transition from 1 to 0 for pid -1
02-07 19:19:06.490 724 1169 I ScannerFramework: [StateMachine::MoveState] Transition from 1 to 0 for pid 1551
02-07 19:19:06.490 724 1169 I ScannerFramework: [Scanner::ScannerEnable] - '0'
02-07 19:19:06.493 1551 1551 D ImagingProxy: Inside ImagingProxy(mServiceName)com.symbol.imagingcapture
02-07 19:19:06.502 724 1169 I ScannerFramework: [StateMachine::MoveState] Transition from 0 to 5 for pid -1
02-07 19:19:06.502 724 1169 I ScannerFramework: [StateMachine::MoveState] Transition from 0 to 5 for pid 1551
02-07 19:19:06.502 724 1169 I ScannerFramework: [DigimarkCWrapper::Decinit] g_mScannerEngine : se4750_cam_builtin g_bInitDone = 1
02-07 19:19:06.513 1168 2203 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:06.513 1168 2203 E ActivityManager: java.lang.Throwable
02-07 19:19:06.513 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:06.513 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19916)
02-07 19:19:06.513 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:06.513 1168 2203 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:06.513 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:06.513 1168 2203 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:06.522 1168 2203 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:06.522 1168 2203 E ActivityManager: java.lang.Throwable
02-07 19:19:06.522 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:06.522 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20009)
02-07 19:19:06.522 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:06.522 1168 2203 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:06.522 1168 2203 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:06.522 1168 2203 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:06.526 1551 1551 D com.symbol.datawedge.api.IntentAPIManager: onReceive(..):com.symbol.datawedge.ScanningService#18323e5,Intent { act=com.symbol.datawedge.api.ACTION flg=0x10 (has extras) }
02-07 19:19:06.541 1168 1543 D CompatibilityInfo: mCompatibilityFlags - 4
02-07 19:19:06.542 1168 1543 D CompatibilityInfo: applicationDensity - 240
02-07 19:19:06.542 1168 1543 D CompatibilityInfo: applicationScale - 1.0
02-07 19:19:06.700 1168 1543 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:06.700 1168 1543 E ActivityManager: java.lang.Throwable
02-07 19:19:06.700 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:06.700 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19916)
02-07 19:19:06.700 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:06.700 1168 1543 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:06.700 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:06.700 1168 1543 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:06.703 1168 1543 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:06.703 1168 1543 E ActivityManager: java.lang.Throwable
02-07 19:19:06.703 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:06.703 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20009)
02-07 19:19:06.703 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:06.703 1168 1543 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:06.703 1168 1543 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:06.703 1168 1543 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:06.706 1551 1551 D com.symbol.datawedge.api.IntentAPIManager: onReceive(..):com.symbol.datawedge.ScanningService#18323e5,Intent { act=com.symbol.datawedge.api.ACTION flg=0x10 (has extras) }
02-07 19:19:06.943 1425 1425 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
02-07 19:19:06.947 1425 1425 D KeyguardUpdateMonitor: handleBatteryUpdate
02-07 19:19:06.947 1397 1785 D HeadsetStateMachine: Disconnected process message: 10, size: 0
02-07 19:19:06.947 1397 1785 D HeadsetStateMachine: Enter processIntentBatteryChanged()
02-07 19:19:06.947 1397 1785 D HeadsetStateMachine: Exit processIntentBatteryChanged()
02-07 19:19:06.948 1397 1785 D HeadsetStateMachine: Exit Disconnected processMessage()
02-07 19:19:06.948 5492 5492 D com.symbol.dataanalytics.a.a.d.b: Received battery event
02-07 19:19:06.948 5492 5492 D com.symbol.dataanalytics.a.a.d.b: BatteryFactory event action = android.intent.action.BATTERY_CHANGED
02-07 19:19:06.972 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:06.989 528 528 I chatty : uid=1000(system) /system/bin/surfaceflinger identical 8 lines
02-07 19:19:06.989 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:07.040 724 1017 I ScannerFramework: [Scanner::ClearReadSubmit] 'ClearReadSubmit' called, Calling process pid '1551'
02-07 19:19:07.040 724 1017 I ScannerFramework: [StateMachine::MoveState] Transition from 5 to 0 for pid -1
02-07 19:19:07.041 724 1017 I ScannerFramework: [StateMachine::MoveState] Transition from 5 to 0 for pid 1551
02-07 19:19:07.041 724 1017 I ScannerFramework: [Scanner::ClearReadSubmit] - '0'
02-07 19:19:07.041 724 1016 I ScannerFramework: [Scanner::ScannerDisable] 'ScannerDisable' called, Calling process pid '1551'
02-07 19:19:07.079 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:07.079 528 528 I chatty : uid=1000(system) /system/bin/surfaceflinger identical 3 lines
02-07 19:19:07.079 528 528 E HWComposer: getLayerReleaseFence: Invalid display
02-07 19:19:07.111 724 1016 I ScannerFramework: [StateMachine::MoveState] Transition from 0 to 1 for pid -1
02-07 19:19:07.111 724 1016 I ScannerFramework: [StateMachine::MoveState] Transition from 0 to 1 for pid 1551
02-07 19:19:07.111 724 1016 W ScannerFramework: [StateMachine::MoveState] Transition from 1 to 1 is invalid
02-07 19:19:07.111 724 1016 I ScannerFramework: [Scanner::ScannerDisable] - '0'
02-07 19:19:07.111 1551 1551 D ScanningProxy: Inside ScannerRelease(). ReferenceCounter value=1
02-07 19:19:07.112 724 1169 I ScannerFramework: [Scanner::ScannerRelease] 'ScannerRelease' called, Calling process pid '1551'
02-07 19:19:07.112 724 1169 I ScannerFramework: [Scanner::ScannerRelease] - '0'
02-07 19:19:07.167 1551 1551 D ScanningProxy: Inside ScannerOpen().... mReferenceCounter=0
02-07 19:19:07.167 724 724 I ScannerFramework: [Scanner::ScannerOpen] 'ScannerOpen' called, Calling process pid '1551', package name 'com.symbol.datawedge'
02-07 19:19:07.167 724 724 E ScannerFramework: [StackAdapter::ScannerOpen] User exists but Scanner not initialized
02-07 19:19:07.168 724 724 I ScannerFramework: [Scanner::ScannerOpen] - '0'
02-07 19:19:07.472 724 1016 I ScannerFramework: [Scanner::IsScannerConnected] 'IsScannerConnected' called, Calling process pid '1551'
02-07 19:19:07.472 724 1016 I ScannerFramework: [Scanner::IsScannerConnected] - '1'
02-07 19:19:07.473 724 1169 I ScannerFramework: [565:487][Scanner::ScannerEnable] 'ScannerEnable' called, Calling process pid '1551'
02-07 19:19:07.676 724 1169 I imgdec : OCRVersionString 1.6.5.11
02-07 19:19:08.042 1551 1551 I RfidServiceManager: Constructor of RfidServiceManager
02-07 19:19:08.048 1551 1551 D RFIDAPI3: bindtoService
02-07 19:19:08.050 1551 1551 D RFIDAPI3: bindtoService registerReceiver
02-07 19:19:08.050 1168 1569 I rfid_service: GetAvailableReader
02-07 19:19:08.050 1168 1569 I RFIDSERVICE-RFIDService: GetAvailableReaders: [1551] <MC3300R20161523020090>
02-07 19:19:08.066 1551 1551 D RFIDAPI3: Connect
02-07 19:19:08.066 1551 1551 D RFIDAPI3: bindtoService
02-07 19:19:08.066 1551 1551 D RFIDAPI3: bindtoService registerReceiver
02-07 19:19:08.067 1168 1595 I rfid_service: Connect
02-07 19:19:08.067 1168 1595 I RFIDSERVICE-RFIDService: Connect: Attempting to connect, Client Name: MC3300R20161523020090, Client PID: 1551
02-07 19:19:08.109 1168 1387 W Binder : Outgoing transactions from this process must be FLAG_ONEWAY
02-07 19:19:08.109 1168 1387 W Binder : java.lang.Throwable
02-07 19:19:08.109 1168 1387 W Binder : at android.os.BinderProxy.transact(Binder.java:754)
02-07 19:19:08.109 1168 1387 W Binder : at com.zebra.rfid.api3.IRFIDDeviceDataCallBack$Stub$Proxy.onData(IRFIDDeviceDataCallBack.java:95)
02-07 19:19:08.109 1168 1387 W Binder : at com.zebra.rfid.RFIDClientConnection.sendData(RFIDClientConnection.java:205)
02-07 19:19:08.109 1168 1387 W Binder : at com.zebra.rfid.RFIDCommMgr$DataWriteThread.run(RFIDCommMgr.java:393)
02-07 19:19:08.136 1551 1551 D API3Android: API3Android Connect status = 0
02-07 19:19:08.231 502 502 D WifiHAL : In DebugCommand::handleResponse
02-07 19:19:08.231 502 502 D WifiHAL : len = 4, expected len = 4
02-07 19:19:08.233 502 502 D WifiHAL : In DebugCommand::handleResponse
02-07 19:19:08.233 502 502 D WifiHAL : len = 4, expected len = 4
02-07 19:19:08.262 1168 1255 D WifiStateMachine: fetchRssiLinkSpeedAndFrequencyNative rssi=-61 linkspeed=144 freq=2462
02-07 19:19:08.422 1168 2170 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:08.422 1168 2170 E ActivityManager: java.lang.Throwable
02-07 19:19:08.422 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:08.422 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19916)
02-07 19:19:08.422 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:08.422 1168 2170 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:08.422 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:08.422 1168 2170 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:08.423 1168 2170 E ActivityManager: Sending non-protected broadcast com.symbol.datawedge.api.RESULT_ACTION from system 1551:com.symbol.datawedge/u0a10 pkg com.symbol.datawedge
02-07 19:19:08.423 1168 2170 E ActivityManager: java.lang.Throwable
02-07 19:19:08.423 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:19400)
02-07 19:19:08.423 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:20009)
02-07 19:19:08.423 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:20151)
02-07 19:19:08.423 1168 2170 E ActivityManager: at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:240)
02-07 19:19:08.423 1168 2170 E ActivityManager: at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3045)
02-07 19:19:08.423 1168 2170 E ActivityManager: at android.os.Binder.execTransact(Binder.java:697)
02-07 19:19:08.425 1551 1551 D com.symbol.datawedge.api.IntentAPIManager: onReceive(..):com.symbol.datawedge.ScanningService#18323e5,Intent { act=com.symbol.datawedge.api.ACTION flg=0x10 (has extras) }
02-07 19:19:08.459 1551 1551 D ScanningProxy: Inside ScannerOpen().... mReferenceCounter=0
02-07 19:19:08.460 724 1169 I ScannerFramework: [Scanner::ScannerOpen] 'ScannerOpen' called, Calling process pid '1551', package name 'com.symbol.datawedge'
02-07 19:19:08.460 724 1169 E ScannerFramework: [StackAdapter::ScannerOpen] User exists but Scanner not initialized
02-07 19:19:08.461 724 1169 I ScannerFramework: [Scanner::ScannerOpen] - '0'
What does this error mean? I'm having this error at runtime. The app crashes when I try to launch. I am new at Android programming.
I have tried to look through the code and I couldn't find it. I would appreciate your help.
02-07 14:32:57.967: E/Trace(943): error opening trace file: No such file or directory (2)
02-07 14:32:58.386: E/AndroidRuntime(943): FATAL EXCEPTION: main
02-07 14:32:58.386: E/AndroidRuntime(943): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.quiz/com.example.quiz.Splash}: java.lang.ClassNotFoundException: Didn't find class "com.example.quiz.Splash" on path: /data/app/com.example.quiz-2.apk
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.os.Looper.loop(Looper.java:137)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.reflect.Method.invoke(Method.java:511)
02-07 14:32:58.386: E/AndroidRuntime(943): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-07 14:32:58.386: E/AndroidRuntime(943): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-07 14:32:58.386: E/AndroidRuntime(943): at dalvik.system.NativeStart.main(Native Method)
02-07 14:32:58.386: E/AndroidRuntime(943): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.quiz.Splash" on path: /data/app/com.example.quiz-2.apk
02-07 14:32:58.386: E/AndroidRuntime(943): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
02-07 14:32:58.386: E/AndroidRuntime(943): ... 11 more
First of all, check if your source is where it is mentioned in the error log.
If it is, check if you've made any typing mistakes
If it still isn't working, it would be easier (In my opinion) to create a new project and rename what is missing (I've done this several times already and it has always worked) Of course, make sure you copy all of your code
It looks like you've missed out your Splash activity in your manifest.
<activity android:name=".Splash"/>
See if that line appears in your manifest, if not you should add it.
I created pretty basic Android application with ActionBar and 2 tabs. It worked OK. Then I added locale resource directory res/values-de and inside it strings.xml with strings translated in German language. I changed language on my Nexus7 to German and application is unable to start after deployment. I got the same problem on emulator.
Please can you help me make this application running with some non default locale on my mobile device? In my case German...
Following error is reported.
02-07 15:32:41.314: W/dalvikvm(16682): threadid=1: thread exiting with uncaught exception (group=0x40d82930)
02-07 15:32:41.324: E/AndroidRuntime(16682): FATAL EXCEPTION: main
02-07 15:32:41.324: E/AndroidRuntime(16682): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tabactionbar/com.example.tabactionbar.MainActivity}: java.lang.NullPointerException
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.os.Looper.loop(Looper.java:137)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-07 15:32:41.324: E/AndroidRuntime(16682): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 15:32:41.324: E/AndroidRuntime(16682): at java.lang.reflect.Method.invoke(Method.java:511)
02-07 15:32:41.324: E/AndroidRuntime(16682): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-07 15:32:41.324: E/AndroidRuntime(16682): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-07 15:32:41.324: E/AndroidRuntime(16682): at dalvik.system.NativeStart.main(Native Method)
02-07 15:32:41.324: E/AndroidRuntime(16682): **Caused by: java.lang.NullPointerException
02-07 15:32:41.324: E/AndroidRuntime(16682): at com.example.tabactionbar.MainActivity.onCreate(MainActivity.java:20)**
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.Activity.performCreate(Activity.java:5104)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
02-07 15:32:41.324: E/AndroidRuntime(16682): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
02-07 15:32:41.324: E/AndroidRuntime(16682): ... 11 more
02-07 15:32:41.334: W/ActivityManager(492): Force finishing activity com.example.tabactionbar/.MainActivity
02-07 15:32:41.434: D/dalvikvm(492): GC_FOR_ALLOC freed 546K, 19% free 15994K/19568K, paused 64ms, total 64ms
02-07 15:32:41.574: D/libgps(492): proxy_gps_nmea_cb()
MainActivity code without TabListener:
public class MainActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
String label1 = getResources().getString(R.string.label1);
Tab tab = actionBar.newTab();
tab.setText(label1);
TabListener<Tab1Fragment> tl = new TabListener<Tab1Fragment>(this,
label1, Tab1Fragment.class);
tab.setTabListener(tl);
actionBar.addTab(tab);
String label2 = getResources().getString(R.string.label2);
tab = actionBar.newTab();
tab.setText(label2);
TabListener<Tab2Fragment> tl2 = new TabListener<Tab2Fragment>(this,
label2, Tab2Fragment.class);
tab.setTabListener(tl2);
actionBar.addTab(tab);
}
Reported line 20 in error is
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
strings.xml with German text is
<string name="app_name">TabActionBar</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
<string name="label1">Eins</string>
<string name="label2">Zwei</string>
<string name="body1">Erste</string>
<string name="body2">Zweite</string>
Please can you help me make this application running with some non default locale on my mobile device? In my case German...
Check out this discussion:
Action Bar - Menu Button - Missing
By any chance, do you also have the styles.xml file inside the values-de folder? This could cause problems with the ActionBar becoming NULL.
Ok, I've tried everything now. What I'm trying to do is just send an SMS. But I get this error when I try:
02-07 17:05:45.550: W/System.err(17373): java.lang.NullPointerException
02-07 17:05:45.550: W/System.err(17373): at android.os.Parcel.readException(Parcel.java:1333)
02-07 17:05:45.555: W/System.err(17373): at android.os.Parcel.readException(Parcel.java:1281)
02-07 17:05:45.555: W/System.err(17373): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:698)
02-07 17:05:45.555: W/System.err(17373): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:113)
02-07 17:05:45.555: W/System.err(17373): at fi.juunas.paali.MainActivity.sendSMS(MainActivity.java:178)
02-07 17:05:45.555: W/System.err(17373): at fi.juunas.paali.MainActivity.textSingle(MainActivity.java:104)
02-07 17:05:45.560: W/System.err(17373): at fi.juunas.paali.MainActivity$1.onClick(MainActivity.java:80)
02-07 17:05:45.560: W/System.err(17373): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
02-07 17:05:45.560: W/System.err(17373): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 17:05:45.560: W/System.err(17373): at android.os.Looper.loop(Looper.java:137)
02-07 17:05:45.560: W/System.err(17373): at android.app.ActivityThread.main(ActivityThread.java:4507)
02-07 17:05:45.560: W/System.err(17373): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 17:05:45.565: W/System.err(17373): at java.lang.reflect.Method.invoke(Method.java:511)
02-07 17:05:45.565: W/System.err(17373): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
02-07 17:05:45.565: W/System.err(17373): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
02-07 17:05:45.565: W/System.err(17373): at dalvik.system.NativeStart.main(Native Method)
I'm calling the function in a method like this:
SmsManager mgr = SmsManager.getDefault();
Log.d(TAG, "Number: " + number);
Log.d(TAG, "Message: " + msg);
mgr.sendTextMessage(number, null, msg,null,null);
number = "0401234567"
msg = "T"
The thing is, this works perfectly on the emulator. Just as you would expect. But not on my Galaxy S2. I hope I'm formatting the number right. I've tried including the country code as well, but the problem is the same. Oh yeah, and the message is only one character long, so the problem can't be that it's too long. And scAddress and the PendingIntents should be allowed to be null.
I'm just running out of ideas. The only thing in my mind is that the number is formatted wrong or there is a massive bug in the S2 OS.
Any ideas?
Ok, problem solved. I updated my phone to Android 4.1.2 (it previously had ICS) and now it works flawlessly. I did not modify the code. So apparently there was something wrong with the OS itself.
https://developer.android.com/reference/android/telephony/SmsManager.html#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)
Send a pending intent object and check why it doesn't work. The pending intent object will contain either
RESULT_ERROR_GENERIC_FAILURE
RESULT_ERROR_RADIO_OFF
RESULT_ERROR_NULL_PDU
As indicated in the API
Hey, There's a lot of posts on here about read barcodes but I want to generate barcodes from a string of numbers and display the generated barcode to the user in my application.
I've had a look at a few libraries iTextPdf and Barbecue, in particular I've been trying to work with iTextPdf
I wondered if anyone knows of or could provide a simple implementation or suggest something better....
I want to draw the barcode directly to a custom view for display in a linear layout with other controls.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Barcode128 code128 = new Barcode128();
code128.setCodeType(Barcode128.CODE128);
code128.setCode("123456789");
Image image128 = code128.createTemplateWithBarcode(barcodeview, null, null);
}
For starters this errors and the app wont actually run, but I don't know how to draw this on to the layout.
This gives the following error
02-07 23:55:31.868: ERROR/AndroidRuntime(212): Uncaught handler: thread main exiting due to uncaught exception
02-07 23:55:31.878: ERROR/AndroidRuntime(212): java.lang.VerifyError: com.itextpdf.text.pdf.Barcode128
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at com.example.barcodetest.Main.onCreate(Main.java:17)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.os.Looper.loop(Looper.java:123)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at android.app.ActivityThread.main(ActivityThread.java:4203)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at java.lang.reflect.Method.invoke(Method.java:521)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
02-07 23:55:31.878: ERROR/AndroidRuntime(212): at dalvik.system.NativeStart.main(Native Method)
Thanks for your help.
Based on your stack trace, iTextPDF is not compatible with Android without at least a recompile, and probably more substantial changes than that. Bear in mind that there is a separate project for iTextPDF for Android -- I do not know if that is what you were using.
A search on a major search engine turns up this product.