Is there a way to reload an Android application in the emulator without closing the emulator, saving any code changes, and running the emulator again? If I make even a simple change to the layout, it takes about 30 seconds by time I run it in Eclipse and Android "boots", and I can unlock the emulator to run the application. Is there any way to shorten this time when making changes, or is it something I just have to deal with?
4 Answers
The Android emulator is hot-deployable. Once you save and click 'run'
(assuming no compile errors) it will package and re-deploy to the emulator which will then restart the app to run the new version. The same is true if you have an Android Developer Phone connected via USB.
If you get the message "Warning: Activity not started, its current task has been brought to the front", it helps to quit/move from the front the running app in the emulator by pressing the back button. Seems like Android does not overwrite the running app in this case.

- 6,518
- 3
- 43
- 52

- 2,588
- 3
- 24
- 25
-
turn around is still slow, but should be much quicker than the 30 seconds you are dealing with. – Kevin Williams Apr 08 '09 at 05:09
-
4Is this really correct ? In the console I see the message: Warning: Activity not started, its current task has been brought to the front. – EtienneSky Sep 02 '11 at 02:40
-
3Upate to my previous entry; I think if you hit the back button and get back to the home screen it will reload. Just deploying it on top of the running application might give you a message like: ActivityManager: Warning: Activity not started, its current task has been brought to the front – EtienneSky Sep 02 '11 at 02:47
-
Is this true too for services? – joveha Nov 02 '11 at 22:43
-
Sorry, I don't know. I haven't been actively developing Android for the last year. Perhaps another developer can answer your question here. – Kevin Williams Nov 21 '11 at 19:16
-
Warning: Activity not started, its current task has been brought to the front should not appear if you made changes to the code, or rebuilt the project via Clean and Build. – josephus Jun 08 '12 at 09:04
-
As far as I know, quitting the App manually in the Emulator via the back button is the only thing that helps against the Activity not started issue. I am using PhongeGap. Maybe this should be added to the answer? Because in my case it does not restart the app, but just "ActivityManager: Warning: Activity not started, its current task has been brought to the front" brings the current activity to front. – Paul Weber Apr 10 '14 at 16:52
-
In my case, but I have just started developing in Android, if I do not quit and restart the emulator, I get unexplainable error messages. – Antonio Sesto Feb 04 '15 at 21:57
In Eclipse go to Run -> Run Configuration ...
For the very first time you need to set the following highlighted option because you don't have any emulator already launched.
After the first run now you have an emulator already running. Now when you make a change again go to Run -> Run Configuration ...
and Set the following highlighted option:
Now the already running emulator will be used every time to relaunch your application and it takes a way less time.
Note: Every time before clicking the Run button press the back button in your emulator once. So, your application is no more running on emulator. Otherwise you might see the following warning:
Warning: Activity not started, its current task has been brought to the front

- 6,279
- 7
- 48
- 77
-
1Especially the notice about that you have to quit the running App in the Emulator by pressing back there helped me a lot. – Paul Weber Apr 10 '14 at 16:49
You have already been told that you don't need to restart the emulator, but now with Android Studio 2.0 you don't even need to restart your app. It has a new feature called Instant Run that allows you to update your app without having to restart it.
Simply enable it in Preferences:
And run:
More info in this link.

- 6,583
- 5
- 40
- 71
instead of running from eclipse, use following batch files in project directory to install and uninstall the apk. Those work great and fast.
Install.bat
cd bin
adb install *.apk
Uninstall.bat
adb uninstall this.is.package.name

- 4,739
- 4
- 41
- 46
-
1That's slower, requires a new script for each project, and not automated like running from Eclipse is. – Christopher Orr Sep 16 '10 at 22:55
-
yes..uninstall script has to be new one for each project..but install script is generic. and it works fast for me than eclipse...may be its my eclipse as i have it loaded.. :) – Vijay C Sep 17 '10 at 06:48
-
1_adb install -r *.apk_ reinstalls the application preserving its data and without a need to uninstall it first – Marek Dec Oct 27 '12 at 18:59