I’m developing a game by cocos2d-x -l cpp.
I’m trouble android’s develop.
When I do “cocos run -p android -m debug”, but, it does uninstall and then install my app in fact.
Once an app is uninstalled, the data of the app are erased.
The data are stored by std::ofstream or FileUtils::writeToFile.
I want to update my developing app, but, don’t want to erase data every compilation.
How can I do?
The game data should be destroyed once the app is un-installed.
Can you sight me an example, how not deleting the data would help and in which scenario will it help…
You are confused.
The change to the script merely stops the app being uninstalled and re-installs instead using the -r flag whilst developing.
If the end-user uninstalls the app from their device then both the app and it’s data are removed.
Exactly. I don’t think anyone would want to develop if their data would be wiped between every reinstall… as is currently the case with the cocos command
I think your fix should be the default behavior when running “cocos run -p android”, or at least an option… can someone propose that? That is the default behavior of iOS anyway