从assets文件夹复制我自己的数据库时出错

时间:2012-03-07 08:14:51

标签: java android database file sqlite

当我尝试将自己的数据库从assets文件夹复制到我的项目数据库文件夹时,我收到此错误:

  03-07 10:39:24.683: E/SqliteDatabaseCpp(27343):    sqlite3_open_v2("/data/data/Dic.proj.pkg/databases/users", &handle, 1, NULL) failed
  03-07 10:39:24.800: E/SQLiteDatabase(27343): Failed to open the database. closing it.
  03-07 10:39:24.800: E/SQLiteDatabase(27343): android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1013)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:962)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at Dic.proj.pkg.DataBaseHelper.checkDataBase(DataBaseHelper.java:61)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at Dic.proj.pkg.DataBaseHelper.createDataBase(DataBaseHelper.java:42)
 03-07 10:39:24.800: E/SQLiteDatabase(27343):   at Dic.proj.pkg.DictionaryActivity.onCreate(DictionaryActivity.java:43)

我该如何解决这个问题?

0 个答案:

没有答案