问题
I have an app and it uses .txt files from assets folder. In assets folder are more directories in some depth. Later I will want to add new files to this assets folder so I'll have a new apk(cause files in assets are part of the apk). The question: So what happens when someone, who is using my app, wants to update my app(with new files in assets) through Google Play, will it uninstall his old version and install the new one or how he receive these new files? Or simpler: What happens during an app update?
Could someone make me keen vision in this a little? Thanks.
回答1:
The old app is just replaced by the new app.
You don't have to worry about that. Apps are always installed completely without loosing data. That is, the .apk file is just replaced. So your assets will be also updated automatically.
Here an example:
Google Play Store downloads the new .apk file.
Next, it replaces the old apk file in /data/app/
by your new apk file.
That means that all the stuff that is in your new app is now available.
In this way the whole application is replaced.
来源:https://stackoverflow.com/questions/35289028/android-app-update-assets-update