Uninstall Android App Before Each Debug

android, debugging, eclipse

Solution

- Right Click your Project

- Properties

- Builder

- New

- Program

- In Name field, type "uninstall" for a name (no quotes needed)

- In location, use Browse file system button and target your adb (something like C:\Users\petey\Android\android-sdk\platform-tools\adb.exe)

- In arguments, "uninstall your.app.package.goes.here" (no quotes needed)

- Hit OK

- Select uninstall

- Hit the Up button until its on the top

Now you should be able to debug & run your app and it will uninstall everytime.

If this is too much and yer on windows Keep a Run dialog open (Start key and r button at same time) and type "adb uninstall your.app.package.goes.here" (no quotes). The run dialog has autocomplete and history to make life easier. You could also do this by terminal or command prompt too. Make sure that platform-tools is in your path tho.

Problem

I am developing an Android app using Eclipse 3.7.2 with the Android SDK installed. I was wondering if there is a setting in Eclipse which when launching the debugger will automatically uninstall any previously existing versions of an app from the device? For example, if I have an app developing, every time I make a change to the app I want to uninstall the old app completely from the phone and install the new one.

Original source