Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4060)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4247)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2613)
at android.os.Handler.dispatchMessage (Handler.java:110)
at android.os.Looper.loop (Looper.java:219)
at android.app.ActivityThread.main (ActivityThread.java:8668)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1109)
Caused by android.database.sqlite.SQLiteException:
at android.database.sqlite.SQLiteConnection.nativePrepareStatement
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement (SQLiteConnection.java:1030)
at android.database.sqlite.SQLiteConnection.prepare (SQLiteConnection.java:637)
at android.database.sqlite.SQLiteSession.prepare (SQLiteSession.java:610)
at android.database.sqlite.SQLiteProgram.<init> (SQLiteProgram.java:66)
at android.database.sqlite.SQLiteStatement.<init> (SQLiteStatement.java:33)
at android.database.sqlite.SQLiteDatabase.executeSql (SQLiteDatabase.java:1899)
at android.database.sqlite.SQLiteDatabase.execSQL (SQLiteDatabase.java:1817)
at com.pcinpact.datastorage.DAO.onUpgrade (DAO.java:247)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:436)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:332)
at com.pcinpact.datastorage.DAO.<init> (DAO.java:178)
at com.pcinpact.datastorage.DAO.getInstance (DAO.java:192)
at com.pcinpact.ListeArticlesActivity.onCreate (ListeArticlesActivity.java:190)
at android.app.Activity.performCreate (Activity.java:8214)
at android.app.Activity.performCreate (Activity.java:8202)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4033)
Cas probable :
oldVersion < 9 - newVersion >= 10
Lors du passage en version 9, on recréée la BDD de 0
Lors du passage en version 10, on veut renommer une colonne de la table. Mais elle n'existe pas vu qu'on vient de recréer la BDD avec le schéma de la version 10.
Cas probable :