我正在使用 SqliteAssetHelper 从 Assets 文件夹导入数据库并将其复制到标准数据库应用程序文件夹。
虽然它的工作非常随机......当我用新文件替换 Assets 文件夹中的 .zip 文件并运行应用程序时,我收到此错误
E/AndroidRuntime(20036): Caused by: com.readystatesoftware.sqliteasset.SQLiteAssetException: Missing databases/adinspect.zip file in assets or target folder not writable
但我确定文件“adinpect.zip”在那里。我刚刚更新了我的数据库模式,重新压缩并替换了 Assets 文件夹中的文件。
我错过了什么?
最佳答案
确保在替换文件后刷新 Assets 文件夹。有时 eclipse 不会注册文件更改。
关于android - SQLiteAssetHelper 生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12780248/