我在主动性方面有致命错误

时间:2017-08-07 06:53:45

标签: android

我的SQLiteException已收到MainActivity

我的Logcat输出,

08-07 11:39:38.687 655-981/? W/ActivityManager:   Force finishing activity com.mynewnotes.mynewnotes/.MainActivity
08-07 11:39:39.199 655-675/? W/ActivityManager: Activity pause timeout for ActivityRecord{42437a78 u0 com.mynewnotes.mynewnotes/.MainActivity t17 f}
08-07 11:41:27.578 993-993/? D/Launcher3: Launcher, startActivitySafely v = com.android.launcher3.PagedViewIcon{42151a50 VFED..CL ...P.... 115,604-230,755 #25}, intent = Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mynewnotes.mynewnotes/.MainActivity }, tag = ApplicationInfo(title=MyNewNotes id=-1 type=0 container=-1 screen=-1 cellX=-1 cellY=-1 spanX=1 spanY=1 dropPos=null pos = 0 isVisible = true)
08-07 11:41:27.579 993-993/? D/Launcher3: Launcher, startActivity v = com.android.launcher3.PagedViewIcon{42151a50 VFED..CL ...P.... 115,604-230,755 #25}, intent = Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mynewnotes.mynewnotes/.MainActivity }, tag = ApplicationInfo(title=MyNewNotes id=-1 type=0 container=-1 screen=-1 cellX=-1 cellY=-1 spanX=1 spanY=1 dropPos=null pos = 0 isVisible = true)
08-07 11:41:27.581 655-880/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mynewnotes.mynewnotes/.MainActivity} from pid 993
08-07 11:41:27.618 655-981/? I/ActivityManager: Start proc com.mynewnotes.mynewnotes for activity com.mynewnotes.mynewnotes/.MainActivity: pid=7193 uid=10161 gids={50161}
08-07 11:41:27.880 7193-7193/? D/MainActivity: Inserted Note 2
08-07 11:41:27.882 7193-7193/? W/System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mynewnotes.mynewnotes/com.mynewnotes.mynewnotes.MainActivity}: android.database.sqlite.SQLiteException: no such column: noteCreated (code 1): , while compiling: SELECT _id, noteText, noteCreated FROM notes ORDER BY noteCreated DESC
08-07 11:41:27.888 7193-7193/? W/System.err:     at com.mynewnotes.mynewnotes.MainActivity.onCreate(MainActivity.java:23)
08-07 11:41:27.890 7193-7193/? E/AndroidRuntime: FATAL EXCEPTION: main
         Process: com.mynewnotes.mynewnotes, PID: 7193
         java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mynewnotes.mynewnotes/com.mynewnotes.mynewnotes.MainActivity}: android.database.sqlite.SQLiteException: no such column: noteCreated (code 1): , while compiling: SELECT _id, noteText, noteCreated FROM notes ORDER BY noteCreated DESC
             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
             at android.app.ActivityThread.access$800(ActivityThread.java:151)
             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
             at android.os.Handler.dispatchMessage(Handler.java:110)
             at android.os.Looper.loop(Looper.java:193)
             at android.app.ActivityThread.main(ActivityThread.java:5292)
             at java.lang.reflect.Method.invokeNative(Native Method)
             at java.lang.reflect.Method.invoke(Method.java:515)
             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
             at dalvik.system.NativeStart.main(Native Method)
          Caused by: android.database.sqlite.SQLiteException: no such column: noteCreated (code 1): , while compiling: SELECT _id, noteText, noteCreated FROM notes ORDER BY noteCreated DESC
             at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
             at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:893)
             at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:504)
             at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
             at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
             at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
             at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
             at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1339)
             at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1186)
             at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1057)
             at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1225)
             at com.mynewnotes.mynewnotes.NotesProvider.query(NotesProvider.java:49)
             at android.content.ContentProvider.query(ContentProvider.java:904)
             at android.content.ContentProvider$Transport.query(ContentProvider.java:234)
             at android.content.ContentResolver.query(ContentResolver.java:462)
             at com.mynewnotes.mynewnotes.MainActivity.onCreate(MainActivity.java:23)
             at android.app.Activity.performCreate(Activity.java:5292)
             at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) 
             at android.app.ActivityThread.access$800(ActivityThread.java:151) 
             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) 
             at android.os.Handler.dispatchMessage(Handler.java:110) 
             at android.os.Looper.loop(Looper.java:193) 
             at android.app.ActivityThread.main(ActivityThread.java:5292) 
             at java.lang.reflect.Method.invokeNative(Native Method) 
             at java.lang.reflect.Method.invoke(Method.java:515) 
             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 
             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
             at dalvik.system.NativeStart.main(Native Method) 
08-07 11:41:27.893 655-951/? W/ActivityManager:   Force finishing activity com.mynewnotes.mynewnotes/.MainActivity
08-07 11:41:28.413 655-675/? W/ActivityManager: Activity pause timeout for ActivityRecord{4287ae88 u0 com.mynewnotes.mynewnotes/.MainActivity t18 f}

0 个答案:

没有答案