java.lang.RuntimeException

Unable to start activity ComponentInfo{com.example.enxin.crystallise/com.example.enxin.crystallise.MainActivity}: android.database.sqlite.SQLiteException: no such column: thoughts (code 1): , while compiling: SELECT _id, title, message, thoughts, category, date FROM note

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1067

  • via Stack Overflow by En Xin
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.enxin.crystallise/com.example.enxin.crystallise.MainActivity}: android.database.sqlite.SQLiteException: no such column: thoughts (code 1): , while compiling: SELECT _id, title, message, thoughts, category, date FROM note at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) 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:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) Caused by: android.database.sqlite.SQLiteException: no such column: thoughts (code 1): , while compiling: SELECT _id, title, message, thoughts, category, date FROM note at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500) 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:1314) at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1200) at com.example.enxin.crystallise.NotebookDbAdapter.getAllNotes(NotebookDbAdapter.java:98) at com.example.enxin.crystallise.MainActivityListFragment.onActivityCreated(MainActivityListFragment.java:39) at android.app.Fragment.performActivityCreated(Fragment.java:1708) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:908) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044) at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1853) at android.app.Activity.performCreate(Activity.java:5234) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    filipebatistafilipebatista
    11 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Indri YunitaIndri Yunita
    2 times, last one
    justCodeitjustCodeit
    58 times, last one
    RiyazRiyaz
    4 times, last one
    109 more bugmates