Skip to content Skip to sidebar Skip to footer

Ormlite Database Helper - Oncreate() Not Called

I am using ormlite.android.4.31.jar I have typical DatabaseHelper public class DatabaseHelper extends OrmLiteSqliteOpenHelper { private static final String DATABASE_NAME = '

Solution 1:

As @k-mera said:

Database file will be created only if you did some operations in Database like "insert".

Solution 2:

Although you say the data is cleared, I suspect that Android thinks it has not. To completely remove the data, I would remove the application and re-install it.

Since your onUpgrade calls onCreate you could also increase the DATABASE_VERSION value which will cause the data to be dropped and re-created.

Post a Comment for "Ormlite Database Helper - Oncreate() Not Called"