Update Android application in emulator without restarting emulator in Eclipse?

Is there a way to reload the Android application in the emulator without closing the emulator, saving any code changes and starting the emulator again? If I make even a simple layout change, it will take about 30 seconds in time, I launched it in Eclipse and Android "boots", and I can unlock the emulator to launch the application. Is there a way to reduce this time when making changes, or is that something I just have to deal with?

+52
android eclipse
Apr 08 '09 at 0:19
source share
5 answers

Android emulator is available for quick deployment. After saving and clicking 'run' (in the absence of compilation errors) it will be packaged and redeployed to the emulator, which will then restart the application to launch the new version. The same is true if you have an Android Developer Phone connected via USB.

If you get the message "Warning: activity has not been started, the current task has been moved to the foreground", it helps to exit the application mode in the emulator by clicking the "Back" button. Android does not seem to overwrite the running application in this case.

+55
Apr 08 '09 at 5:08
source share

In Eclipse, go to Run -> Run Configuration ...

The first time you need to set the next highlighted parameter, because you do not already have an emulator running. enter image description here

After the first launch, you now have an emulator running. Now that you have made the changes, go to Run -> Run Configuration ...

and set the following highlighted option: enter image description here

Now the already running emulator will be used every time to restart the application, and this takes less time.

Note. Each time, before clicking the Run button, press the back button in your emulator once. Thus, your application no longer works on the emulator. Otherwise, you may see the following warning:

Warning: activity is not running, its current task has been brought to the fore

+21
Jul 21 2018-12-21T00:
source share

You have already been told that you do not need to restart the emulator, but now with Android Studio 2.0 you do not even need to restart the application. It has a new Instant Run feature that allows you to update the application without restarting.

Just enable it in the settings:

enter image description here

And run:

enter image description here

Additional information in this link .

+3
Apr 7 '16 at 18:11
source share

instead of running from eclipse, use the following batch files in the project directory to install and remove apk. They work fine and fast.

Install.bat

 cd bin adb install *.apk 

Uninstall.bat

 adb uninstall this.is.package.name 
+1
Sep 16 '10 at
source share

If I came to this question, I assume that there will be more (at least a few years ago).

Press R twice.

0
Aug 27 '17 at 7:53 on
source share



All Articles