0

I am trying for last 2 days but can not find any solution.My emulator screen hangs when trying to run android application with error message in error log as below:

No command output when running: 'am start -n com.ss.hello/com.ss.hello.MainActivity -a       
android.intent.action.MAIN -c 

Exception stack trace:

com.android.ddmlib.ShellCommandUnresponsiveException
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
at com.android.ddmlib.Device.executeShellCommand(Device.java:435)
at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(ActivityLaunchAction.java:67)
at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(ActivityLaunchAction.java:109)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doLaunchAction(AndroidLaunchController.java:1277)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doLaunchAction(AndroidLaunchController.java:1289)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(AndroidLaunchController.java:1261)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleLaunch(AndroidLaunchController.java:906)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.continueLaunch(AndroidLaunchController.java:748)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch(AndroidLaunchController.java:409)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch(LaunchConfigDelegate.java:322)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:238)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Session data:

eclipse.buildId=v22.0.1-685705
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product com.android.ide.eclipse.adt.package.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product    com.android.ide.eclipse.adt.package.product

Console output is :

[2013-06-16 13:51:02 - Hello] ------------------------------
[2013-06-16 13:51:02 - Hello] Android Launch!
[2013-06-16 13:51:02 - Hello] adb is running normally.
[2013-06-16 13:51:02 - Hello] Performing com.ss.hello.MainActivity activity launch
[2013-06-16 13:51:02 - Hello] Automatic Target Mode: Preferred AVD 'MY_AVD' is available on emulator 'emulator-5554'
[2013-06-16 13:51:02 - Hello] Uploading Hello.apk onto device 'emulator-5554'
[2013-06-16 13:51:04 - Hello] Installing Hello.apk...
[2013-06-16 13:51:30 - Hello] Success!
[2013-06-16 13:51:30 - Hello] Starting activity com.ss.hello.MainActivity on device emulator-5554

From this point nothing happens.It just hang on.I wait for 1-2 hr.but nothing happen.Tried to clean project,delete project,check for updates,etc...nothing works.

I am running simplest and small application.It has no error and also i set minimum and target SDK version as 10 and 17 respectively. My AVD's target is 17.

What is solution for this ?

Ponting
  • 2,248
  • 8
  • 33
  • 61

2 Answers2

5
  • First and foremost what is your PC's configuration?? , how much RAM?? The higher the API level you set , more processing time will be taken by emulator.
  • If you have good configuration PC, then as mentioned by many, you should Wipe user data from AVD and uncheck load from snapshot and then give this a try.
  • If still having issues, delete the AVD and recreate...
  • If still having issues, then try Android x86 instead of armeable simulators. Android x86 are much more faster ..
  • Your Eclipse is updated as you mentioned then try opting for x86 emulators.. Refer here..
  • Try restarting Eclipse as a last resort...

Developing an application is generally for a targeted devices, so if possible run and test on real device itself.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
CRUSADER
  • 5,486
  • 3
  • 28
  • 64
  • Thanks for your answer in detail.My PC is Windows 7 64 bit.RAM is 2GB. I tried with Wipe user data and snapshot is already unchecked from beginning. I also tried by deleting and recreating AVD. I also tried with restarting eclipse so many times. These options are not working for me.I will try by using x86 emulator and get back to you. – Ponting Jun 26 '13 at 12:37
  • 1
    Thank you mate...Your solution of Android x86 works like a charm...I am trying this for last three weeks.It not just solve my problem but also improve execution speed and reduced time for booting up emulator.Thanks once again... – Ponting Jun 26 '13 at 19:06
2

The startup of the emulator is very slow. The good thing is that you only need to start the emulator once. If the emulator is already running and you run your app again, the emulator reinstalls the app relatively quickly. Of course, if you want to know how fast it will run on a phone, it is best to test it on a real phone.

Aayush
  • 33
  • 6