【发布时间】:2013-12-21 04:31:52
【问题描述】:
我正在使用Phonegap开发我的应用程序,所以我需要将CSS,JS,JS库,index.html打包到assets/www文件夹,并且
super.loadUrl("file:///android_asset/www/index.html",4000);
但是有没有一种方法可以在不更新我的应用程序的情况下更新我的 CSS、JS、JS 库、index.html(不无论从商店还是我们自己的服务器更新 apk 文件)--这是因为我需要与本机交互的某些页面(CSS/JS,index.html)可能需要更改。
听起来很蠢,但是有没有办法满足这个要求,iOS 解决方案怎么样?
我读过这篇文章: cannot modify the files in /android_assets/www with the File API,can't get a file object from an asset
但是,我找到了copy files in assets to sdcard。
那么,我可以以某种方式更新资产文件吗? 或者这听起来很愚蠢(我不知道 iOS 解决方案):
1 复制到 sdcard
2 更新css/js/index.html
3 super.loadUrl("/mnt/sdcard/myapp/index.html",4000);
还有其他解决方案吗,THX?
【问题讨论】: