我正在尝试创建一个服务,我想在后台将图像上传到服务器,但是当尝试在模拟器中执行时,ti运行完美,但是当我尝试在设备中运行相同时它会产生sqlite lite错误。代码在phonegap中返回,但服务代码以本机返回。 这是logacat错误:
02-24 13:04:21.988: I/System.out(1160): call after 2 minutes
02-24 13:04:21.992: I/System.out(1160): Your connection succeed
02-24 13:04:21.992: I/System.out(1160): Check Database Exist or not?
02-24 13:04:21.992: I/(1160): database exists
02-24 13:04:21.996: I/System.out(1160): my path in db helper data/data/com.sacpl.nesso`/app_database/file__0/0000000000000001.db
02-24 13:04:21.996: I/System.out(1160): path of the database: /data/data/com.sacpl.nesso/databases/0000000000000001.db
02-24 13:04:21.996: I/System.out(1160): Database already Exist
02-24 13:04:21.996: I/(1160): --------------------Call get master `Entry----------------------
02-24 13:04:22.000: I/Database(1160): sqlite returned: error code = 1, msg = no such table: android_metadata
02-24 13:04:22.000: E/Database(1160): SELECT locale FROM android_metadata failed
02-24 13:04:22.007: E/Database(1160): Failed to setLocale() when constructing, closing the database
02-24 13:04:22.007: E/Database(1160): android.database.sqlite.SQLiteException: no such table: android_metadata
02-24 13:04:22.007: E/Database(1160): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
02-24 13:04:22.007: E/Database(1160): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1987)
02-24 13:04:22.007: E/Database(1160): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1855)
02-24 13:04:22.007: E/Database(1160): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
02-24 13:04:22.007: E/Database(1160): at com.sacpl.nesso.MyService.getNewMasterEntry(MyService.java:441)
02-24 13:04:22.007: E/Database(1160): at com.sacpl.nesso.MyService.onStartCommand(MyService.java:111)
02-24 13:04:22.007: E/Database(1160): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2043)
02-24 13:04:22.007: E/Database(1160): at android.app.ActivityThread.access$2800(ActivityThread.java:117)
02-24 13:04:22.007: E/Database(1160): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:998)
02-24 13:04:22.007: E/Database(1160): at android.os.Handler.dispatchMessage(Handler.java:99)
02-24 13:04:22.007: E/Database(1160): at android.os.Looper.loop(Looper.java:123)
02-24 13:04:22.007: E/Database(1160): at android.app.ActivityThread.main(ActivityThread.java:3687)
02-24 13:04:22.007: E/Database(1160): at java.lang.reflect.Method.invokeNative(Native Method)
02-24 13:04:22.007: E/Database(1160): at java.lang.reflect.Method.invoke(Method.java:507)
02-24 13:04:22.007: E/Database(1160): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
02-24 13:04:22.007: E/Database(1160): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
02-24 13:04:22.007: E/Database(1160): at dalvik.system.NativeStart.main(Native Method)
02-24 13:04:22.007: W/System.err(1160): android.database.sqlite.SQLiteException: no such table: android_metadata
02-24 13:04:22.007: W/System.err(1160): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
02-24 13:04:22.007: W/System.err(1160): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1987)
02-24 13:04:22.007: W/System.err(1160): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1855)
02-24 13:04:22.007: W/System.err(1160): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
02-24 13:04:22.007: W/System.err(1160): at com.sacpl.nesso.MyService.getNewMasterEntry(MyService.java:441)
02-24 13:04:22.007: W/System.err(1160): at com.sacpl.nesso.MyService.onStartCommand(MyService.java:111)
02-24 13:04:22.007: W/System.err(1160): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2043)
02-24 13:04:22.007: W/System.err(1160): at android.app.ActivityThread.access$2800(ActivityThread.java:117)
02-24 13:04:22.007: W/System.err(1160): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:998)
02-24 13:04:22.007: W/System.err(1160): at android.os.Handler.dispatchMessage(Handler.java:99)
02-24 13:04:22.007: W/System.err(1160): at android.os.Looper.loop(Looper.java:123)
02-24 13:04:22.007: W/System.err(1160): at android.app.ActivityThread.main(ActivityThread.java:3687)
02-24 13:04:22.007: W/System.err(1160): at java.lang.reflect.Method.invokeNative(Native Method)
02-24 13:04:22.007: W/System.err(1160): at java.lang.reflect.Method.invoke(Method.java:507)
02-24 13:04:22.007: W/System.err(1160): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
02-24 13:04:22.015: W/System.err(1160): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
02-24 13:04:22.015: W/System.err(1160): at dalvik.system.NativeStart.main(Native Method)
任何想法都表示赞赏 提前谢谢