我正在开发一个应用程序,其中我从服务器下载sqlite db文件,并将该db文件存储到内存中指定的文件夹中。此外,我能够访问数据库,它在以前版本的Android "KITKAT 4.4.2“中运行良好。
我在"KITKAT 4.4.2“中收到”未知错误(代码14):无法打开数据库“异常。请找人谁可以帮助我在下面提到的几点。
1. I am getting the error in the openDatabase() method. Why?
2. What is the problem with the "KITKAT 4.4.2"?
3. How to resolve this issue? 发布于 2014-08-20 21:29:45
从Android kitkat开始,数据库的默认位置从" databases“改为"app_databases”,如果你正在硬编码路径,那么你应该改变它,不建议硬编码内部目录的路径。
File dbFile = context.getDatabasePath(name_of_database_file);https://stackoverflow.com/questions/23752714
复制相似问题