Reputation: 3729
When I deploy/debug APK with android studio it always retains data by default. I want to make a new configuration that helps me install without data retention. Any ideas?
And no, I don't want to use gradle at command line everytime.
Upvotes: 1
Views: 2190
Reputation: 26402
You can do duplicate your current run configuration and make it to clear storage
Edit Configruations
Clear Storage before deployment
Upvotes: 0
Reputation: 2562
adb shell pm clear <you.package.name>
Make sure you have adb
in command line, otherwise you need to configure adb in your PATH, or go to the directory of your Android SDK.
Copied from my another question but changed the key command: stackoverflow.com/a/25927723/4932305
adb
in Program: and shell pm clear <you.package.name>
in Parameters:. Make sure that the new item is selected when you click Ok in the popup window.Upvotes: 3