开发者

Run a clean Android build from Eclipse?

Is there a way to run a build from Eclipse that cleans out the application's data each time? I'd like to do so in order to check the first-run experience for m开发者_如何转开发y application.


If you are using eclipse, go to app's run configurations, click on the target tab, and check the wipe user data field. I believe this will clear the app's data each time the eclipse project is run.

Run a clean Android build from Eclipse?


Yes, depending on the platform, create an uninstall script. In your project's settings tell the eclipse builder to run it in your project's settings. It can be configured to only run after you clean your project. Alternatively you could use an Ant script but that may be overkill if you don't already know how to use Ant.

There is an additional issue of handling switching between devices or emulator but if you tend to only use one at a time there should be no issue.

If you only debug with one device or emulator at a time this is all you need:

adb uninstall your.application.package
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜