android - 直接从 Assets 中以只读方式打开sqlite

标签 android sqlite

我已经找到了很多关于如何将数据库从 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/

相关文章:

c - SQLite:将 C 结构插入多个表 - 帮助设计

android - 我可以为当前线程锁定 SQLite 表吗?

python - 防止多个约束sqlite3 python的重复

java - Android使用php上传文件到服务器

android - 通过代码将 TextView 的宽度设置为 wrap_content

java - 实现异步任务: An error occured while executing doInBackground() throws Runtime exception

java - 在Java中的公共(public)数组中按属性对json对象列表进行分组

android - 如何将 arraylist<string> 转换为 string[]

android - 如何使用字符串变量而不是整数在 SQLite 数据库中进行搜索?

ruby-on-rails - rails 上的 ruby : Order index page of a model (Topic) based on another model (Post)