Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse not running Android app on emulator a second time

I've decided to teach myself how to program android apps, and so got the ADT onto eclipse and going through the tutorials on the android development page. I've run into a problem where eclipse doesn't launch the emulator to run the app a second time.

I first noticed the problem on the second tutorial talking about different layouts for an app. I'm able to run the app just fine the first time, the emulator pops up and I see the layout that I'm testing. I then close the emulator, make a small change (or no change at all), run it again, and eclipse gets stuck in "launching delegate" part. In the bottom right hand corner it states that it's loaded to 27%, but then nothing happens. My CPU isn't being taken up by any processes that you'd expect with it launching an emulator. I've tried canceling the launch but then that just gets the new title of "canceling launch" and still nothing happens. If I close and reopen eclipse, I'm able to launch like normal again, but then the second try it does the same thing.

I then went back to the first tutorial ("Hello Android!") and found the problem exists there as well. I've tried killing and restarting the server in adb and that didn't help.

I'm emulating for android 2.2 froyo on windows xp in eclipse. I have java JDK 6u29 installed.

UPDATE:

Rerunning the app in the emulator without closing said emulator doesn't work - progress bar still loads and stops at 27% with no change afterwards.

UPDATE 2:

Problem not solved, but found a work around by just keeping the emulator running.

like image 374
Vici37 Avatar asked Nov 28 '11 02:11

Vici37


People also ask

How can I run Android apps instead of emulator?

In the Android Studio toolbar, select your app from the run configurations drop-down menu. From the target device drop-down menu, select the device that you want to run your app on. Select Run ▷. This will launch the app on your connected device.

Can you make Android apps in Eclipse?

For developing the android application using eclipse IDE, you need to install the Eclipse. you can download it from this location download the Eclipse. Eclipse classic version is recommended but we are using the Eclipse IDE for JavaEE Developers.

How do I open an app on Android emulator?

Run on an emulator In Android Studio, create an Android Virtual Device (AVD) that the emulator can use to install and run your app. In the toolbar, select your app from the run/debug configurations drop-down menu. From the target device drop-down menu, select the AVD that you want to run your app on. Click Run .

Can Android run Eclipse?

Eclipse is the tool we'll be using to develop in. It is the most popular Android development environment and has officially supported tools from Google. Download Eclipse from the website below. Find the link for your operating system and 32/64 bit version.


2 Answers

I think I have found a solution.

right click on your project -> Run As -> Run Configurations -> Common -> uncheck "Launch in background"

At least, it works for me:)

like image 95
shebik Avatar answered Oct 01 '22 05:10

shebik


Team,

Found some solution for this, hope it helps

  1. Start the eclipse
  2. Go to Windows->AVD manager-> select the Virtual device -> click start
  3. Right click the project -> select run as-> run configuration and the same virtual device
  4. Your application should load now
  5. Dont close the emulator, you can make changes to the code and follow the 3rd step

Till now i don't have problem with this method, any thoughts would be highly appreciated

like image 10
Narendran Srinivasan Avatar answered Oct 01 '22 05:10

Narendran Srinivasan