'how can I remove and wipe out saved data on usb device in Android Studio when running a code?
My code uses shared preferences and local db and saves some data on my usb device. I wanna to run my code from scratch every time. and these saved data be clear.
For now I go to setting on my device , in 'Apps' section , find my app , and touch 'clear data' button to remove these saved data.
Is there any way in Android Studio to wipe out user data ? I checked 'Wipe User Data' in emulator tab but it doesn't work , I think it works only for emulators not usb devices.
Solution 1:[1]
Stop your emulator. Open the android virtual device manager from Tools > Android > AVD Manager. There you can see your emulator(example:nexus). Press the arrow in the right side and choose wipe data. That's all open again the emulator.
Solution 2:[2]
Today, Open the android, in the top bar go to Tools select Device Manager, after click on arrow (this item is at the right of the device selection), and finally click on wipe data. That's all.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Michael Osofsky |
| Solution 2 | OsvaltOsvalth |
