使用ORMLite v 4.40,我尝试让我的应用程序运行,但似乎忽略了onCreate函数
我的DatabaseHelper看起来像这样(片段样式)
public class ORMLiteHelper extends OrmLitesqliteOpenHelper { private Context databaseContext; private static String DATABASE_NAME = "InVinoVeritas"; private static int DATABASE_VERSION = 1; public ORMLiteHelper(Context context) { super (context,DATABASE_NAME,null,DATABASE_VERSION); Log.v("ORMLiteHelper","Cosntructor"); ... @Override public void onCreate(sqliteDatabase database,ConnectionSource connectionSource) { Log.v("DatabaseHelper","onCreate"); ... @Override public void onUpgrade(sqliteDatabase database,ConnectionSource connectionSource,int oldVersion,int newVersion) { Log.v("DatabaseHelper","onUpgrade"); ...
我的MainActivity调用DatabaseHelper,如下所述:
public class MainActivity extends OrmLiteBaseActivity<ORMLiteHelper> {
我试过重新安装应用程序,升级数据库版本,没有任何作用.
我确实看到了构造函数调用(包括拼写错误:-),但onCreate和onUpgrade却没有被调用.
任何帮助赞赏
巴里