Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Issue with Eclipse Emulator Install

I have started the project 3 times and followed directions exactly. When i go to run the Emulator it takes roughly 25 minutes to launch the Home screen. After this it attempts to install the Crystal Ball.apk, instead of installing i get a error message. Below is the Console log. I just want to know if it could be the emulator or perhaps my computer or am i just completely doing something wrong.

[2013-09-27 13:15:55 - Crystal Ball2] New emulator found: emulator-5554 [2013-09-27 13:15:55 - Crystal Ball2] Waiting for HOME ('android.process.acore') to be launched... [2013-09-27 13:39:58 - Crystal Ball2] HOME is up on device 'emulator-5554' [2013-09-27 13:39:58 - Crystal Ball2] Uploading Crystal Ball2.apk onto device 'emulator-5554' [2013-09-27 13:39:59 - Crystal Ball2] Installing Crystal Ball2.apk... [2013-09-27 13:42:15 - Crystal Ball2] Failed to install Crystal Ball2.apk on device 'emulator-5554! [2013-09-27 13:42:15 - Crystal Ball2] (null) [2013-09-27 13:42:16 - Crystal Ball2] Launch canceled!

And now without changing any code or the emulator it successfully installs yet all i get is the regular phone emulator screen with no access to the Crystal Ball screen or app. Below is the Console log for the retest.

[2013-09-27 13:49:39 - Crystal Ball2] ------------------------------ [2013-09-27 13:49:39 - Crystal Ball2] Android Launch! [2013-09-27 13:49:39 - Crystal Ball2] adb is running normally. [2013-09-27 13:49:39 - Crystal Ball2] Performing com.example.crystal.ball2.MainActivity activity launch [2013-09-27 13:49:39 - Crystal Ball2] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'android41' [2013-09-27 13:49:39 - Crystal Ball2] Uploading Crystal Ball2.apk onto device 'emulator-5554' [2013-09-27 13:49:40 - Crystal Ball2] Installing Crystal Ball2.apk... [2013-09-27 13:51:33 - Crystal Ball2] Success! [2013-09-27 13:51:33 - Crystal Ball2] Starting activity com.example.crystal.ball2.MainActivity on device emulator-5554

I am getting the same problem. Not sure if I missed something or if there is something wrong with my computer.

1 Answer

I did a google search, and this worked for me. Basically, the emulator is timing out before the application can be installed.

In Eclipse, go to 'Window' > 'Preferences' > 'Android' > 'DDMS',

Change the 'ADB connection timeout (ms)' from 5000 to 10000.

Make sure the emulator is running before you run the app.

Hope that helps!

I attempted to apply this change and it acted like it was about to work but instead it continued to have a error and never open the project in the emulator.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

I had to make this same change on an older Windows computer. Glad it worked for you, Patrick.

Adam, I'm not sure what your exact problem might be. Hopefully StackOverflow can help. Here's one fix to try, and there are others in this question thread that might help: http://stackoverflow.com/a/4765753/475217