java.lang.RuntimeException: Unable to start receiver com.yhl8019.autoanswer.AutoAnswerReceiver:
java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.app.ActivityThread.handleReceiver(ActivityThread.java:2244) at android.app.ActivityThread.access$1500(ActivityThread.java:133) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1279) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4794) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. at android.database.CursorWindow.nativeGetString(Native Method) at android.database.CursorWindow.getString(CursorWindow.java:434) at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51) at android.database.CursorWrapper.getString(CursorWrapper.java:114) at com.yhl8019.PhoneUtilsFunction.deleteCallLogZuiJinRecord(PhoneUtilsFunction.java:177) at com.yhl8019.autoanswer.AutoAnswerReceiver.onReceive(AutoAnswerReceiver.java:80) at android.app.ActivityThread.handleReceiver(ActivityThread.java:2237) ... 10 more引起错误的原因:
多了一个空格,所以导致插入数据库的时候没问题,查询数据库的时候找不到。