运行代码时,如何删除和清除Android Studio中USB设备上保存的数据? [英] how can I remove and wipe out saved data on usb device in Android Studio when running a code?
问题描述
我的代码使用共享的首选项和本地数据库,并将一些数据保存在我的USB设备上. 我想每次都从头开始运行我的代码. 并且这些保存的数据将被清除.
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.
Android Studio中有什么方法可以清除用户数据? 我在模拟器"选项卡中选中了擦拭用户数据",但它不起作用,我认为它仅适用于模拟器,而不适用于USB设备.
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.
推荐答案
停止模拟器. 从工具> Android> AVD管理器中打开android虚拟设备管理器. 在这里,您可以看到您的模拟器(示例:nexus). 按右侧的箭头,然后选择擦除数据. 模拟器全部打开了.
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.
这篇关于运行代码时,如何删除和清除Android Studio中USB设备上保存的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!