Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Stalling on Android apk Install

I have been working on fixing this for two days to no eval. Any Help would be much appreciated.

I have the following installed:

  • Eclipse

  • android-sdk-macosx

  • Android SDK Tools

  • Android 2.2 API 8

  • Android 2.3.3 API 10

I have a phonegap Project setup. Click "Run" -> "Run as" -> "Android Application"

In the console tap I see this:

[2011-12-14 10:47:38 - Foanar] ------------------------------

[2011-12-14 10:47:38 - Foanar] Android Launch!

[2011-12-14 10:47:38 - Foanar] adb is running normally.

[2011-12-14 10:47:38 - Foanar] Performing com.phonegap.foanar.App activity launch

[2011-12-14 10:47:38 - Foanar] Automatic Target Mode: launching new emulator with compatible 
AVD '3DEVO'

[2011-12-14 10:47:38 - Foanar] Launching a new emulator with Virtual Device '3DEVO'

[2011-12-14 10:47:40 - Emulator] 2011-12-14 10:47:40.256 emulator-arm[3278:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.

[2011-12-14 10:47:40 - Emulator] emulator: WARNING: Unable to create sensors port: Connection refused

[2011-12-14 10:47:40 - Foanar] New emulator found: emulator-5554

[2011-12-14 10:47:40 - Foanar] Waiting for HOME ('android.process.acore') to be launched...

[2011-12-14 10:48:04 - Foanar] HOME is up on device 'emulator-5554'

[2011-12-14 10:48:04 - Foanar] Uploading Foanar.apk onto device 'emulator-5554'

[2011-12-14 10:48:05 - Foanar] Installing Foanar.apk...

The AVD "3DEVO" Launches but never installs the Foanar.apk. I never get any errors in LogCat or Console. Eclipse seems to hang here and go no further. I suspect it maybe has something to do with this line:

[2011-12-14 10:47:40 - Emulator] emulator: WARNING: Unable to create sensors port: Connection refused

I have been able to install the app via terminal using: adb install /CapitalOnline/android/Foanar/bin/Foanar.apk

I would like to get Eclipse back up and working as terminal is ok but Eclipse is more convenient for testing builds directly from Eclipse. I used to be able to run this all the time. The only change to my machine outside of Eclipse that may or may not have anything to do with this... I installed AppMobi XDK and AppMobiPhoneGap XDK though my Chrome browser which creates its own dev environment in my user directory. Is it possible that in some way ports are crossing and refusing connections?

Thanks to anyone willing to help figure this out!

like image 544
danroose Avatar asked Dec 14 '11 17:12

danroose


2 Answers

Once I came across this problem too. I don't remember exactly what I did to resolve it. I have had 2 emulator-related problems in that period and I found solutions for both of them, but now I can't remember which solution was for which problem :) So I'll suggest both methods.

  1. Try cleaning the user data on your emulator. To do so, open your avd location (for me it was "C:\Users\UserName.android\avd") find your emulator (I guess it's 3DEVO.avd) and delete the files called "userdata.img" and "userdata-qemu.img".
  2. While your program is running and stuck, open your Task Manager, go to processes and kill adb. Go back to Eclipse and run again. If there's an error about adb not launched, quit Eclipse and launch again.

Hope this will help.

like image 193
ArVan Avatar answered Sep 28 '22 05:09

ArVan


killing adb from activity monitor fixed this for me.

if you have the device view open (windows > show views > other... > android > devices), you can choose downward arrow > reset adb

like image 43
davidjnelson Avatar answered Sep 28 '22 05:09

davidjnelson