Working on emulator, not on the device or another emulator. The set target is correct [closed]

StackOverflow https://stackoverflow.com/questions/20180640

  •  04-08-2022
  •  | 
  •  

Question

here is the logCat file:

11-25 01:53:50.047: E/Trace(26246): error opening trace file: No such file or directory (2)
11-25 01:53:50.057: D/ActivityThread(26246): setTargetHeapUtilization:0.25
11-25 01:53:50.057: D/ActivityThread(26246): setTargetHeapIdealFree:8388608
11-25 01:53:50.057: D/ActivityThread(26246): setTargetHeapConcurrentStart:2097152
11-25 01:53:50.117: D/AndroidRuntime(26246): Shutting down VM
11-25 01:53:50.117: W/dalvikvm(26246): threadid=1: thread exiting with uncaught exception (group=0x40ecf378)
11-25 01:53:50.127: E/AndroidRuntime(26246): FATAL EXCEPTION: main
11-25 01:53:50.127: E/AndroidRuntime(26246): java.lang.RuntimeException: Unable to create application my.app.cal.CalApplication: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4196)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.ActivityThread.access$1300(ActivityThread.java:138)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1267)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.os.Looper.loop(Looper.java:213)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.ActivityThread.main(ActivityThread.java:4787)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at java.lang.reflect.Method.invokeNative(Native Method)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at java.lang.reflect.Method.invoke(Method.java:511)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at dalvik.system.NativeStart.main(Native Method)
11-25 01:53:50.127: E/AndroidRuntime(26246): Caused by: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.database.AbstractCursor.checkPosition(AbstractCursor.java:418)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:74)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at my.app.cal.CalApplication.readWeighingDetailFromDB(CalApplication.java:45)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at my.app.cal.CalApplication.onCreate(CalApplication.java:26)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
11-25 01:53:50.127: E/AndroidRuntime(26246):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4193)
11-25 01:53:50.127: E/AndroidRuntime(26246):    ... 10 more
Was it helpful?

Solution

Looks like something is wrong in the readWeightDeatilFromBD class in the onCreate Event !!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top