Eclipse, adb, and ddms not detecting Android Emula

2019-01-22 07:59发布

问题:

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?

回答1:

Try to adb kill-server and then do adb command like adb devices which will start adb again.

It helps in my case.



回答2:

Best solution I found is this:

  1. Open DDMS(Window->Open Perspective->DDMS)
  2. In DDMS in the left side there is a Devices tab, a little below there is a list of items, choose little triangle called View Menu, under it find Reset adb and launch it.

After that I get my emulator detected.



回答3:

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.



回答4:

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



回答5:

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?