我已经找到了很多关于如何将数据库从 Assets 复制到/data/data/tld.c.u/databases/的解决方案 - 但是以只读方式打开数据库并查询它是绝对不可能的吗内容?
我有一个相当大的数据库,我正在与应用程序一起分发,如果必须将数据库从 Assets 文件夹中复制出来,那将是一种浪费。
最佳答案
But is it absolutely impossible to just open the database in readonly and query its content?
是的。
I have a rather large database i'm distributing with the app and its kind of a waste if the database must be copied out of the assets folder.
考虑不要将它与应用程序一起分发,而是在首次运行时下载它,或使用 Google Play 的新 APK expansion files设施。
关于android - 直接从 Assets 中以只读方式打开sqlite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9911004/