Eclipse、adb 和 ddms 未检测到 Android 模拟器
我想尝试对 Android 设备进行编程,所以我按照 Android 网站的指示安装了 sdk、java sdk 和 eclipse。我的计算机是 Windows 7 64 位,但自从听说 64 位版本存在问题后,我安装了 32 位 Java SDK 和 Eclipse。
我正在运行最新版本的 Android sdk,4.0 R15。
我相信遵循了所有安装说明,但是当我加载示例(本例中为 Lunar Lander)时,它会加载模拟器,但不会将应用程序安装到其中。当我使用“adb devices”时,ADB 不显示列出的模拟器,eclipse 中的 DDMS 透视图也没有检测到任何设备。在模拟器中,我已激活开发人员区域中的 USB 调试设置。
我尝试过重新启动adb服务器,并重新安装了几次。
我什至复制了一个人在 youtube 教程上为 hello world 程序所做的操作,但它仍然无法加载到设备上。
有谁知道如何让模拟器和 Eclipse 进行对话,以便我可以实际运行和调试程序?
I wanted to try my hand at programming android devices, so I followed the directions from the android website, installed the sdk, the java sdk, and eclipse. My computer is Windows 7 64-Bit, but I have the 32-bit Java SDK and Eclipse installed since hearing that there are issues with the 64-bit versions.
I am running the most recent version of the Android sdk, 4.0 R15.
I believe followed all of the instructions for installation, but when I load up a sample (Lunar Lander in this case), it loads the emulator, but will not install the app to it. ADB does not show the emulator listed when I use "adb devices", the DDMS perspective in eclipse does not detect any device either. In the emulator I have activated the USB debug setting in the developer area.
I have tried restarting the adb server, and have reinstalled a few times.
I even copied what one guy did on a youtube tutorial for a hello world program, and it still would not load to the device.
Does anybody have any idea how to get the emulator and eclipse talking so I can actually run and debug programs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
尝试
adb Kill-server
,然后执行adb devices
之类的adb命令,这将再次启动adb。这对我的情况有帮助。
Try to
adb kill-server
and then do adb command likeadb devices
which will start adb again.It helps in my case.
我发现的最佳解决方案是这样的:
之后我检测到我的模拟器。
Best solution I found is this:
After that I get my emulator detected.
按照窗口 -> AVD 管理器 -> 新建(为您的设备命名并选择目标) -> 创建新的 AVD创建 AVD。
选择您创建的 AVD,然后单击“开始”启动该设备。
仅在启动时,设备才会显示在
adb devices
下。Create new AVD following Window->AVD Manager->New (Give a name to your device & select the target) -> Create AVD.
Select the AVD that you created and Click Start to launch the devie.
Only on launching, the device is displayed under
adb devices
.对于初学者,我认为您可以尝试 64 位版本的 Java 和 Eclipse for Windows。我有 Windows 7 64 位版本、64 位 java 和 eclipse 版本,所有版本都运行良好,没有任何故障。不过我有一个问题。你到底把Android安装在哪里了?我的意思是,使用 Android 开发者网站上提供的安装程序。如果您已将其安装在 C:\Program Files 中,请尝试直接将其重新安装到 C:\ 而不是 Program Files 目录中。当目录为 C:\Program Files 时,我遇到了问题,然后我将其更改为 C:\ 。
For starters, I think you can try the 64 bit versions of Java and Eclipse for Windows. I've Windows 7 64-bit edition, 64-bit java and eclipse versions and all work very well, without any glitches. I however have a question. Where exactly have you installed Android? I mean, using the installer that's available in the Android Developer website. If you've installed it in C:\Program Files, then try re-installing it in C:\ directly instead of Program Files directory. I had faced issues when the directory was C:\Program Files and then I changed it to C:\ .
我注意到,如果您向设备分配大量内存,它可能会在启动时“冻结”,如果冻结足够长的时间,它就会从 adb 设备列表中消失。尝试减少应用程序的内存占用?
I noticed that if you allocate a lot of memory to the device it can "freeze" when starting, if frozen for a sufficient period it disappears from the adb devices list. Try reduce the memory footprint of the application?