static String DB_PATH = "/data/data/com.yuzhiyun.chemistry/databases/"; static String DB_NAME = "sqlite3.db"; private SQLiteDatabase db; this.db = SQLiteDatabase.openDatabase(DB_PATH+DB_NAME,null,SQLiteDatabase.OPEN_READWRITE);
The code is as above, and this error occurred when executing SQLiteDatabase.openDatabase():
file is encrypted or is not a database
Later, someone on the Internet said that it was the version of sqlite. I didn't know the database. The version was 2. I immediately rebuilt a sqlite database connection with Navicat, selected version 3, and then imported the data, but the result was not This error will appear, the specific reason I do not understand.