ADT插件中的android模拟器没有运行

时间:2022-04-12 18:54:25

I'm using Eclipse ADT plugin for android development. I came across some problems and I remove all my existing emulators and 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 Android os.

我正在使用Eclipse ADT插件进行android开发。我遇到了一些问题,我删除了所有现有的模拟器并创建了一个新的。当我运行一个android项目并启动仿真器时,它就会在启动android os之前突然出现并以黑屏死机。

ADT插件中的android模拟器没有运行

and the progress tab shows,No operations to display at this time. and the logcat displaying I/ServiceManager(270): Waiting for service SurfaceFlinger... over and over again. And the console shows

进度选项卡显示,此时不显示操作。显示I/ServiceManager(270)的logcat:等待服务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 emulator never launched. No rusalt although I restart the IDE.

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

when I restart the adb using DDMS perspective 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 manager also shows the emulator as a valid emulatorADT插件中的android模拟器没有运行

avd管理器还将仿真器显示为有效的仿真器

And when I close the emulator the console shows,

当我关闭模拟器控制台显示,

[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!!!

有人能帮我吗?谢谢! ! !

5 个解决方案

#1


17  

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.

要解决这个问题,请转到窗口——> Open Perspective——> DDMS。在DDMS视图中,在屏幕左边寻找设备。你应该会看到一个有12个图标的酒吧。单击向下箭头并单击“重置ADB”。它应该工作。

#2


2  

In this case, I was able to run an emulator with Android 2.2. But unable to run an emulator in Android 4.2 which 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),重新安装。稍后,模拟器启动良好。谢谢! !

#3


0  

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...

我建议你用蓝色的堆栈作为你的模拟器。它真的更快更有效…如果您正在使用蓝色堆栈,首先启动蓝色堆栈,然后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/

#4


0  

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键中,或者导航到tools目录并从那里执行命令:

./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之后,设备管理器应该自动刷新,否则尝试重新启动设备管理器或选择refresh window按钮。

#5


-1  

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

也许你的AVD属性有问题,把它改成与你的android项目兼容的地方,仅此而已。

#1


17  

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.

要解决这个问题,请转到窗口——> Open Perspective——> DDMS。在DDMS视图中,在屏幕左边寻找设备。你应该会看到一个有12个图标的酒吧。单击向下箭头并单击“重置ADB”。它应该工作。

#2


2  

In this case, I was able to run an emulator with Android 2.2. But unable to run an emulator in Android 4.2 which 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),重新安装。稍后,模拟器启动良好。谢谢! !

#3


0  

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...

我建议你用蓝色的堆栈作为你的模拟器。它真的更快更有效…如果您正在使用蓝色堆栈,首先启动蓝色堆栈,然后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/

#4


0  

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键中,或者导航到tools目录并从那里执行命令:

./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之后,设备管理器应该自动刷新,否则尝试重新启动设备管理器或选择refresh window按钮。

#5


-1  

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

也许你的AVD属性有问题,把它改成与你的android项目兼容的地方,仅此而已。