One-Click Deploy on Android deletes user:// files

Godot Version

4.3 mono

Question

It appears that using one-click deploy to Android deletes all files in the user:// directory. If you run the game from the device a subsequent time, the files remain, until you deploy again. It makes it exceedingly difficult to develop if you can’t effectively save data to the device (no, I don’t want to request permission to write elsewhere on the device)

Is this expected behaviour, an Android bug, or a Godot bug?

Is there a permission problem or another export setting that needs changing?
Godot doesn’t have any problem reading and writing to the user:// directory.

I’ve tried setting android:hasFragileUserData=“true” by setting “Retain Data on Uninstall” to on. I get the prompt asking if I want to keep data when uninstalling on the device. It still deletes the user:// data anyway whether uninstalling from the device or uninstalling as part of the one-click deploy process.

Fixed.
Its in the editor settings → export → android → One Click Deploy Clear Previous Install
Easy once you know how.