Run a clean build of Android from Eclipse?

Is there a way to run a build from Eclipse that clears application data every time? I would like to do this to test the first experience for my application.

+1
source share
2 answers

If you use eclipse, go to the application launch configuration, click on the target tab and check the user data field. I believe this will clear the application data every time the eclipse project starts.

Eclipse - Android run configurations

+5
source

Yes, depending on the platform, create an uninstall script. In your project settings, tell the eclipse builder to run it in your project settings. It can only be configured to run after cleaning your project. Alternatively, you can use Ant script, but this may be redundant if you do not already know how to use Ant.

There is an additional problem of handling switching between devices or an emulator, but if you usually use only one, there should be no problem.

If you are just debugging one device or emulator at a time, that’s all you need:

adb uninstall your.application.package 
0
source

All Articles