Very new to Java. By working with my application and deciding, I would reset my DATABASE_VERSION to 1 (for no real reason).
When I launched the application, it crashed, and one of the errors:
E / AndroidRuntime (14905): called: android.database.sqlite.SQLiteException: cannot downgrade the database from version 17 to 4
E / AndroidRuntime (14905): with android.database.sqlite.SQLiteOpenHelper.onDowngrade (SQLiteOpenHelper.java:307)
I already have onUpgrade() where I delete the tables and then run onCreate() ... so I thought I would do onDowngrade() :
@Override public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { onUpgrade(db); }
But apparently this is not a superclass method that I can override.
Is there a way (hopefully) so that I can change the database version to any number I want and run it without crashing right away?
java android sqlite
Dave
source share