ORMLite on Android not calling onCreate() when you haven't actually 'do something' with the database

[Question]

 I am running app in debug mode from eclipse, constructor of DatabaseHleper is called but onCreate() is not called.

[Soltuon]

Create instance of ORMLiteHelper and call getWritableDatabase(). When database is not created then onCreate will be invoked.

[Reference]

http://stackoverflow.com/questions/10260137/ormlite-database-helper-oncreate-not-called

http://stackoverflow.com/questions/10920911/ormlite-on-android-not-calling-oncreate?lq=1

原文地址:https://www.cnblogs.com/abnercai/p/3145083.html