从资产只读开放源码直接 [英] Open sqlite in readonly directly from assets

查看:109
本文介绍了从资产只读开放源码直接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了很多解决方案,如何它可以复制一个数据库,从资产/data/data/tld.cu/databases/ - 但它是绝对不可能的,只是以只读方式打开数据库和查询其内容?

我有一个相当大的数据库,我与应用程序和它的一种浪费,如果分发数据库必须复制出资产的文件夹中。

解决方案
  

但它是绝对不可能的,只是以只读方式打开数据库和查询的内容?

是的。

  

我有一个相当大的数据库,我与应用程序和它的一种浪费,如果分发数据库必须复制出资产的文件夹。

考虑不与应用程序分配它,而是在第一次运行下载它,或者使用谷歌Play的新的 APK扩展文件设施。

I've found a lot of solutions to about how its possible to copy a database from assets to /data/data/tld.c.u/databases/ - 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.

解决方案

But is it absolutely impossible to just open the database in readonly and query its content?

Yes.

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.

Consider not distributing it with the app, but rather downloading it on first run, or using Google Play's new APK expansion files facility.

这篇关于从资产只读开放源码直接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆