Android 模拟器启动但 Eclipse 无法识别它

发布于 2024-10-29 19:27:12 字数 309 浏览 4 评论 0原文

一般来说,一切都工作正常,但有时 Eclipse 或我的 Android 模拟器会变得很混蛋并拒绝工作。

我在 Eclipse 中打开 AVD 管理器。我选择所需的 AVD,然后单击“开始”。模拟器启动并经历漫长的引导过程。它终于完成启动,然后由于某种原因,它立即重新启动并再次经历漫长的启动过程。一旦第二次启动,Eclipse 就会失去对它的跟踪。它不再列在“设备”选项卡中,我无法安装我的应用程序或在该模拟器上运行它。如果我终止模拟器并尝试重新启动它,那么我会得到完全相同的行为。这太令人沮丧了。

控制台中没有出现任何消​​息来解释该行为。知道为什么会发生这种情况吗?

As a general rule, everything works fine, but then sometimes either Eclipse or my Android emulator decides to be a jerk and refuses to work.

I open the AVD Manager in Eclipse. I choose which AVD I want and click Start. The emulator starts up and it goes through the loooong process of booting. It finally finishes booting and then for some reason, it immediately reboots and goes through the looong process of booting again. Once it boots the second time, Eclipse loses track of it. It is no longer lists in the Devices tab and I can't install my app or run it on that emulator. If I kill the emulator and try to start it over, then I get the exact same behavior. It's incredibly frustrating.

There are no messages happening in the console to explain the behavior. Any idea why this is happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梨涡 2024-11-05 19:27:13

在 Eclipse 中,选择 Window->Show View->Devices。

在此处输入图像描述

如果您在新打开的窗口中看不到模拟器,请选择同一窗口中的向下箭头图标窗口(最小化和最大化按钮附近),然后从下拉菜单中选择“重置 ADB”。

在此处输入图像描述

另一种方法是打开 CMD.exe 并键入以下两个命令(根据需要更改 ADB 目录) :

C:\Program Files\Android\android-sdk\platform-tools\adb.exe kill-server
C:\Program Files\Android\android-sdk\platform-tools\adb.exe start-server

While in Eclipse, choose Window->Show View->Devices.

enter image description here

If you can't see the emulator on the newly opened window choose the down-arrow icon in the same window (near the minimize and maximize buttons) and from the dropdown menu select "Reset ADB".

enter image description here

The alternative is to open CMD.exe and type the following two commands (change the ADB directory as necessary):

C:\Program Files\Android\android-sdk\platform-tools\adb.exe kill-server
C:\Program Files\Android\android-sdk\platform-tools\adb.exe start-server
祁梦 2024-11-05 19:27:13

我也见过这个。如果您终止并重新启动 adb 服务器,Eclipse 应该会看到它。

I've seen this too. If you kill and restart the adb server, Eclipse should then see it.

拒绝两难 2024-11-05 19:27:13
> ./adb kill-server
> ./adb start-server

在 mac os x / eclipse 中尝试了这些命令 - 有效,但它也会杀死实际设备,您必须拔出/重新插入它们才能恢复它们。

> ./adb kill-server
> ./adb start-server

tried these commands in mac os x / eclipse - works, but it also kills the actual devices and you have to unplug/plug them back in to get them back.

祁梦 2024-11-05 19:27:12

当 adb 在模拟器之前启动时,这是一个已知问题。我不知道真正的原因,但一个快速的解决方法是在命令提示符下重新启动 adb(模拟器正在运行)。

> adb kill-server
> adb start-server

现在,

> adb devices

将返回模拟器,Eclipse 将能够安装该应用程序。

That's a known issue when adb starts before the emulator. I don't know the real reason, but a quick workaround is to restart adb in the command prompt (with the emulator running)

> adb kill-server
> adb start-server

Now,

> adb devices

will return the emulator and Eclipse will be able to install the app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文