7

Lately, when I'm trying to run my Android apps on my device, I have to run it several times from Eclipse before it actually starts.

I have tried to reinstall JRE, JDK and the IDE and I have tried to switch workspaces. I have also let Eclipse use more RAM for the Java VM.

Both my IDE, JRE, JDK, ADTand ADT-plugin are up to date.

Any suggestions on this are very much appreciated.

No command output when running: 'am start -n com.example.abstab/com.example.abstab.ActivityMain -a android.intent.action.MAIN -c android.intent.category.LAUNCHER' on device HT15CV805781

Exception Stack Trace:

com.android.ddmlib.ShellCommandUnresponsiveException
    at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
    at com.android.ddmlib.Device.executeShellCommand(Device.java:453)
    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:640)
    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=M20120914-1800
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/myname/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/myname/.eclipse_keyring -showlocation
Ruben
  • 796
  • 3
  • 9
  • 21
  • Did you found your problem solved? I am having same problem here. – Ponting Jun 16 '13 at 08:45
  • I haven't found a solution. I have recently installed a different ROM on my device, so maybe restoring factory defaults may help your problem? I still don't know if it was the machine I developed on or the device causing the problem. :( – Ruben Jun 17 '13 at 13:05
  • So you want to say that I reinstall adt bundle for android? – Ponting Jun 19 '13 at 05:59
  • @FastTrack I haven't been able to reproduce the problem on my current system after restoring factory defaults on my device. – Ruben Jun 20 '13 at 14:52

3 Answers3

0

I encounter the same most of the time, and it works when I restart ADB server. Most of the time, ADB goes into a sort of limbo (specially when emulators are starting afresh), and I've had to restart it manually like:

adb kill-server
adb start

After restarting ADB using the above commands, then Eclipse Android runs are very stable.

Subhas
  • 14,290
  • 1
  • 29
  • 37
0

'am start -n com.example.abstab/com.example.abstab.ActivityMain -a android.intent.action.MAIN -c android.intent.category.LAUNCHER' on device HT15CV805781

HT15CV805781 might have a problem with device

at com.android.ddmlib.Device.executeShellCommand(Device.java:453)

that line of exception indicate that your application having trouble to executing in device .

Reboot device may help sometimes , or restart the connection of adb bridge .

dharmendra
  • 7,835
  • 5
  • 38
  • 71
  • thanks for your response.I restarted my device(AVD) and also restarted adb bridge with **adb kill-server and adb start-server**. But it didnt work.It gives same error. Device configuration is attached as here: [Device configuration](http://postimg.org/image/5wih4nxd1/) – Ponting Jun 20 '13 at 18:02
  • I have updated question. can you look at in seesion data : BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US .Is there any problem here of win 32/64 bit.I am using win 64 bit version. – Ponting Jun 20 '13 at 18:17
  • make sure you have download SDK for 64 bit . – dharmendra Jun 20 '13 at 18:26
  • Yes,I have downloaded SDK for 64 bit.I have edited question but it is not visible to you untill Ruben(owner of question) review it.So i edited my question [Click Here](http://stackoverflow.com/questions/17131524/emulator-screen-hangs-when-trying-to-run-android-application) Please dont mark it as duplicate because i ask it before bounty. – Ponting Jun 20 '13 at 18:41
  • @FastTrack I will not accept your edits to this post, as you are experiencing this problem with the emulator and I had it with a physical device. However, I do believe a solution for either one of us can solve both or problems. If you have your problem solved, I shall mark this one as solved as well... – Ruben Jun 21 '13 at 12:55
0

try this command:

adb.exe kill-server
adb.exe start-server
adb.exe shell am start -n com.example.abstab/.ActivityMain
The Badak
  • 2,010
  • 2
  • 16
  • 28