在模拟器上工作,而不是在设备或其他模拟器上工作。设定的目标是正确的

时间:2013-11-24 20:35:17

标签: runtime-error android-logcat

这是logCat文件:

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

1 个答案:

答案 0 :(得分:0)

onCreate事件中的readWeightDeatilFromBD类看起来有问题!!