I have an Android app that saves the values from different EditText boxes on pressing "SAVE" Button to a Sqlite database. This app works fine on Emulator and gives desired output. But app shows "Force Close" error on pressing "SAVE" Button in mobile device.
I have worked on Sqlite database previously and I am pretty sure there is no error in that part. Then what is the problem. Please Help.
Here are the LogCat entries it if help :-
08-03 12:08:28.875: I/ActivityManager(59): Starting activity: Intent {cmp=com.SMSDb/.Settings }
08-03 12:08:29.665: I/ActivityManager(59): Displayed activity com.SMSDb/.Settings: 744 ms (total 744 ms)
08-03 12:08:47.126: D/dalvikvm(10469): GC_FOR_MALLOC freed 6935 objects / 332488 bytes in 108ms
08-03 12:08:47.155: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.SMSDbActivity }
08-03 12:08:47.765: I/ActivityManager(59): Displayed activity com.SMSDb/.SMSDbActivity: 498 ms (total 498 ms)
08-03 12:08:57.765: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.Settings }
08-03 12:08:58.526: I/ActivityManager(59): Displayed activity com.SMSDb/.Settings: 665 ms (total 665 ms)
08-03 12:09:00.438: W/KeyCharacterMap(10469): No keyboard for id 0
08-03 12:09:00.438: W/KeyCharacterMap(10469): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
08-03 12:09:04.646: I/ActivityManager(59): Starting activity: Intent { cmp=com.SMSDb/.SMSDbActivity }
08-03 12:09:05.316: I/ActivityManager(59): Displayed activity com.SMSDb/.SMSDbActivity: 535 ms (total 535 ms)
May be the problem is that you are not running a fresh copy of your app on Emulator. Due to this the code for creating a new SQLite database for new installation of your Application is not checked, but this always happens in your Mobile device coz it would make a fresh installation of App. So try debugging on "Create" part of SQLite db of app. It may solve the problem !!