Android的 - 更新资源的文件/文件夹生 [英] Android - update a file in res/raw folder

查看:185
本文介绍了Android的 - 更新资源的文件/文件夹生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新我的RES文件/名为dbschema.xml将原始文件夹的内容,使用dbschema.xml将较新版本是某处在手机上(对于为例,在数据/数据​​// dbschema.xml将) 我已经做了部分检查新文件是否存在,而现在我想将它复制到原料。 你有什么想法? 谢谢你。

I want to update the content of a file on my res/raw folder called dbschema.xml, using a newer version of dbschema.xml that is somewhere on the phone (for exemple, at data/data//dbschema.xml) I've already done the part to check if the new file exists, and i want now to copy it to raw. Do you have any idea? Thanks.

推荐答案

这是不可能的,你不能修改这些文件的内容,因为它们是安装包里面。你可以将文件,而不是复制到您的应用程序的私有目录,在需要的时候进行阅读和更新。

It's not possible, you can't modify the content of those files since they are inside the installation package. You could instead copy the file to the private directory of your app, read it from there and update when needed.

这篇关于Android的 - 更新资源的文件/文件夹生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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