我正在尝试过去 2 天,但找不到任何解决方案。尝试运行 android 应用程序时,我的模拟器屏幕挂起,错误日志中显示错误消息,如下所示:
No command output when running: 'am start -n com.ss.hello/com.ss.hello.MainActivity -a
android.intent.action.MAIN -c
异常堆栈跟踪:
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)
会话数据:
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
控制台输出是:
[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
从这一点开始,什么都没有发生。它只是挂起。我等待 1-2 小时。但没有任何反应。尝试清理项目、删除项目、检查更新等......没有任何效果。
我正在运行最简单的小型应用程序。它没有错误,并且我将最小和目标 SDK 版本分别设置为 10 和 17。我的 AVD 的目标是 17。
什么是解决方案?