publicclassUserGlobalAppextendsApplication{ privatestatic UserGlobalApp application; privatefinalstaticStringdbName="HiJia"; //数据库名字 /** A flag to show how easily you can switch from standard SQLite to the encrypted SQLCipher. */ publicstaticfinalbooleanENCRYPTED=false; //改为true需要加入包compile 'net.zetetic:android-database-sqlcipher:3.5.1' private DaoSession daoSession; @Override publicvoidonCreate() { super.onCreate(); application=this; initDb(); }