简体   繁体   中英

Delete database file from assets folder

I want to delete a file in assets folder in run-time. I have a database file in assets folder that copies to data folder at run-time but after installing my app the size of app become twice as large (assets + data folder)!

How I can delete database file from assets folder to avoid this?

You can't delete a file at runtime that was delivered with your App.

See this discussion about it:

How to remove a file in assets at run time?

The whole content of your APK is read only and can not be modified

除了上面的答案,你可以做的一件事就是在manifest ...中的preferExternalStorage将会有所帮助

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM