尝试运行 android 应用程序时模拟器屏幕挂起

时间:2023-04-22
本文介绍了尝试运行 android 应用程序时模拟器屏幕挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在尝试过去 2 天,但找不到任何解决方案.我的模拟器屏幕在尝试运行 android 应用程序时挂起,错误日志中的错误消息如下:

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 

异常堆栈跟踪:

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 小时.但没有任何反应.尝试清理项目、删除项目、检查更新等...没有任何效果.

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.

我正在运行最简单的小型应用程序.它没有错误,并且我将最低和目标 SDK 版本分别设置为 10 和 17.我的 AVD 目标是 17 岁.

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.

有什么解决办法?

推荐答案

回答晚了,但我认为这会有所帮助..

Late to answer but I think this will help..

  • 首先,您的 PC 配置是什么?,多少内存?b'因为您设置的 API 级别越高,处理时间就越多由模拟器拍摄..
  • 如果你有配置好的电脑,那么正如很多人所说,你应该从 AVD 中擦除用户数据并取消选中从快照中加载和那就试试看吧..
  • 仍有问题,删除 AVD 并重新创建...
  • 还是有问题,然后尝试 Android x86 代替 armeable模拟器.Android x86 更快..
  • 您的 Eclipse 已按照您所说的进行更新,然后尝试选择 x86模拟器..参考这里..
  • 尝试重新启动 Eclipse 作为最后的手段... :P
  • First and foremost what is your PC's configuration?? , how much RAM?? b'coz 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..
  • Still prob, delete the AVD and recreate...
  • Still prob, 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... :P

开发应用程序通常是针对目标设备的,因此如果可能的话,请在真实设备本身上运行和测试.

希望这会有所帮助...

Hope this helps...

这篇关于尝试运行 android 应用程序时模拟器屏幕挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

上一篇:Android 4.0.3 模拟器:安装失败并出现“权限撤销"; 下一篇:无法从 Eclipse、android 中删除虚拟设备

相关文章