[Android] Saved data are erased by "cocos compile"

Try editing tools/cocos2d-console/plugins/project_deploy.py to be this (around line 197)

   #TODO detect if the application is installed before running this
   # adb_uninstall = "%s uninstall %s" % (adb_path, self.package)
   # self._run_cmd(adb_uninstall)
   adb_install = "%s install -r \"%s\"" % (adb_path, apk_path)
   self._run_cmd(adb_install)
1 Like