ADT 插件中的 android 模拟器未运行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20325051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 02:40:28  来源:igfitidea点击:

android emulator in ADT plugin not running

androideclipseaudioandroid-emulator

提问by Samantha Withanage

I'm using Eclipse ADTplugin for androiddevelopment. I came across some problems and I remove all my existing emulatorsand create a new one. when I run an android project and start the emulator, it just pop up and freezes with a black screen even before it start Androidos.

我正在使用Eclipse ADT插件进行android开发。我遇到了一些问题,我删除了所有现有的模拟器并创建了一个新的模拟器。当我运行一个 android 项目并启动模拟器时,它甚至在启动Androidos之前就弹出并冻结并显示黑屏。

enter image description here

在此处输入图片说明

and the progress tabshows,No operations to display at this time.and the logcatdisplaying I/ServiceManager(270): Waiting for service SurfaceFlinger...over and over again. And the consoleshows

并显示进度选项卡No operations to display at this time.并且一遍又一遍地显示logcatI/ServiceManager(270): Waiting for service SurfaceFlinger...。而控制台显示

[2013-12-02 14:54:03 - Emulator] emulator: warning: opening audio input failed
[2013-12-02 14:54:03 - Emulator] 
[2013-12-02 14:54:04 - AndroidV4Virtusel] New emulator found: emulator-5554
[2013-12-02 14:54:04 - AndroidV4Virtusel] Waiting for HOME ('android.process.acore') to be launched...

But the emulatornever launched. No rusalt although I restart the IDE.

模拟器从未启动。尽管我重新启动了 IDE,但没有 rusalt。

when I restart the adbusing DDMSperspective it gives following error.

当我使用DDMS视角重新启动adb时,它会出现以下错误。

[2013-12-02 15:22:50 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2013-12-02 15:22:51 - DeviceMonitor] Connection attempts: 1

The avd manageralso shows the emulatoras a valid emulatorenter image description here

AVD管理也显示了仿真器作为一个有效的模拟器在此处输入图片说明

And when I close the emulatorthe consoleshows,

当我关闭仿真器控制台显示,

[2013-12-02 15:34:23 - hierarchyviewer]Unable to get view server version from device emulator-5554
[2013-12-02 15:34:23 - hierarchyviewer]Unable to get view server protocol version from device emulator-5554
[2013-12-02 15:34:23 - ViewServerDevice]Unable to debug device: My1 [emulator-5554]
[2013-12-02 15:34:23 - hierarchyviewer]Missing forwarded port for emulator-5554
[2013-12-02 15:34:23 - hierarchyviewer]Unable to get the focused window from device emulator-5554 

So can someone help me? Thank you!!!

那么有人可以帮助我吗?谢谢!!!

回答by Jimi

To solve this, go to Window --> Open Perspective --> DDMS. In the DDMS View, look for devices on the left of your screen. You should see a bar having about 12 icons. Click on the down arrow and click the "reset ADB". It should work afterwards.

要解决此问题,请转到窗口 --> 打开透视图 --> DDMS。在 DDMS 视图中,查找屏幕左侧的设备。您应该会看到一个包含大约 12 个图标的栏。单击向下箭头,然后单击“重置 ADB”。它应该在之后工作。

回答by Samantha Withanage

In this case, I was able to run an emulatorwith Android 2.2. But unable to run an emulator in Android 4.2which is my applications target. So i just removed Android 4.2 (API 17)and just reinstall it. Later on emulator starts fine. Thanks!!

在这种情况下,我能够使用Android 2.2运行模拟器。但无法在Android 4.2 中运行模拟器,这是我的应用程序目标。所以我刚刚删除了 Android 4.2 (API 17)并重新安装它。后来模拟器启动正常。谢谢!!

回答by Shry Vishnu Murugesan

I would suggest you to use the blue stacks as your emulator.. its really faster and efficient.. If you are using the Blue Stacks, first start your blue stacks and then eclipse or whatever the IDE you are using...

我建议你使用 blue stacks 作为你的模拟器..它真的更快更有效..如果你使用 Blue Stacks,首先启动你的 blue stacks,然后 eclipse 或者你正在使用的任何 IDE ......

you can also have a look here

你也可以看看这里

http://infopulseukraine.com/eng/blog/Software-Development/Mobile/Bluestacks_Eclipse/

http://infopulseukraine.com/eng/blog/Software-Development/Mobile/Bluestacks_Eclipse/

回答by TheIT

As an extension to Jimi's answer, the easiest way to restart adb is to type the following command into a console window:

作为 Jimi 回答的扩展,重启 adb 的最简单方法是在控制台窗口中键入以下命令:

adb kill-server

If you get an error about adb command not found, then you can either add the android system tools path to your PATH key in environment variables, or just navigate to the tools directory and execute the command from there:

如果您收到有关未找到 adb 命令的错误,那么您可以将 android 系统工具路径添加到环境变量中的 PATH 键,或者导航到工具目录并从那里执行命令:

./AndroidSdk/platform-tools

After killing the server, make sure it's restarted correctly by typing:

杀死服务器后,通过键入以下内容确保它正确重新启动:

adb devices

Which should show you a list of connected devices.

这应该向您显示已连接设备的列表。

After restarting adb, the device manager should automatically refresh, otherwise try restarting device manager or selecting the refresh window button.

重启adb后,设备管理器应该会自动刷新,否则尝试重启设备管理器或选择刷新窗口按钮。

回答by lory

Maybe there is something wrong with your AVD properties,change it to where it compatible to your android projects,that's all.

也许您的 AVD 属性有问题,请将其更改为与您的 android 项目兼容的位置,仅此而已。