마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

keeps stopping

0 추천
Keeps stopping이 뜨면서 팅기는데 어떻게 해야할까요..

 

2022-12-07 21:31:00.496 17783-17783/com.example.last E/SQLiteLog: (1) no such column: writeDate
2022-12-07 21:31:00.496 17783-17783/com.example.last D/AndroidRuntime: Shutting down VM
2022-12-07 21:31:00.497 17783-17783/com.example.last E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.last, PID: 17783
    java.lang.RuntimeException: Unable to resume activity {com.example.last/com.example.last.T1}: android.database.sqlite.SQLiteException: no such column: writeDate (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM DiaryInfo ORDER BY writeDate DESC
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: android.database.sqlite.SQLiteException: no such column: writeDate (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM DiaryInfo ORDER BY writeDate DESC
        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:986)
        at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:593)
        at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:61)
        at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1443)
        at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1382)
        at com.example.last.DatabaseHelper.getDiaryListFromDB(DatabaseHelper.java:40)
        at com.example.last.T1.setLoadRecentList(T1.java:69)
        at com.example.last.T1.onResume(T1.java:60)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
        at android.app.Activity.performResume(Activity.java:7939)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2022-12-07 21:31:00.503 17783-17783/com.example.last I/Process: Sending signal. PID: 17783 SIG: 9
진안린이 (120 포인트) 님이 2022년 12월 7일 질문

1개의 답변

0 추천
로그를 잘 보시면 에러원인이 있습니다.

no such column: writeDate (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM DiaryInfo ORDER BY writeDate DESC

 DiaryInfo테이블에 writeDate 라는 칼럼이 존재하지 않는다고 되어있네요. 칼럼명을 확인해 보세요.
spark (228,010 포인트) 님이 2022년 12월 8일 답변
...