20

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?

Xantham
  • 1,829
  • 7
  • 24
  • 42
  • 1
    No errors that I can tell. My console output is: 'code' [2011-12-11 20:02:44 - LunarLander] ------------------------------ [2011-12-11 20:02:44 - LunarLander] Android Launch! [2011-12-11 20:02:44 - LunarLander] adb is running normally. [2011-12-11 20:02:44 - LunarLander] Performing com.example.android.lunarlander.LunarLander activity launch [2011-12-11 20:02:56 - LunarLander] Launching a new emulator with Virtual Device 'dev40' 'code' While trying to get this, it did appear to work once, but then it didn't work again. Logcat also shows no errors because it can't connect to the emulator – Xantham Dec 12 '11 at 04:05
  • Check [this question](http://stackoverflow.com/questions/5867531/eclipse-ddms-not-showing-anything-but-adb-ddms-are-working) – Ranhiru Jude Cooray Dec 12 '11 at 04:14
  • it is very very slow in general.. maybe you should wait till it complete? it would either return an error msg or successfully deploy (for me) – lynnyilu Dec 12 '11 at 04:22
  • I had checked that question earlier, but tried again anyway, and it didn't work. Stay awake was already checked, so that was okay. How long should somebody have to wait? I think I didn't say in the main message, when I load the emulator, it loads fine, it gets to the lock screen, I can unlock it, and do the normal built in things on the phone emulator. But after the emulator is fully loaded, the sample application is not downloaded onto the emulator. I also can't see it as an attached device through adb, ddms, or the manual load screen (launch new avd or load to connected device window). – Xantham Dec 12 '11 at 04:28
  • Just in case, I ran the program from eclipse when I started writing my last comment, and left it running until now, unlocked, (so about 18 minutes or so). So far it has not detected the emulator and loaded the program. – Xantham Dec 12 '11 at 04:47
  • I left it on a bit longer and still nothing. Though I was capable of connecting to the emulator via telnet, but adb still would not show it as a device. Does anybody know how to solve this? – Xantham Dec 12 '11 at 05:11
  • possible duplicate of [emulator not showing in adb devices](http://stackoverflow.com/questions/7502011/emulator-not-showing-in-adb-devices) – childno͡.de Oct 22 '14 at 18:08

5 Answers5

65

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

It helps in my case.

Andrey Regentov
  • 3,687
  • 4
  • 34
  • 40
  • 2
    This is great and all, it fixed it for me too. Does anyone know why this works? Why doesn't the initial push work? – dharga May 23 '13 at 18:15
  • I'm also wondering because it's still happening, and this answer saved me a lot of time and nerves.. – Blacklight Feb 07 '14 at 08:25
9

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.

hipokito
  • 413
  • 4
  • 11
2

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.

Priya Kathir
  • 263
  • 1
  • 6
  • This saved me a headache. I wondered why it was missing from the list. Trying to copy to its SDCard. +1 – IAmGroot May 15 '12 at 08:45
  • 1
    Thanks for the +1, Doomsknight!I do it too whenever I use an idea from StackOverflow.. but never left a comment!! – Priya Kathir May 16 '12 at 10:11
0

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?

Arran Ubels
  • 1,764
  • 1
  • 10
  • 8
0

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

Ghost
  • 3,966
  • 1
  • 25
  • 36
  • I originally had it installed where the executable installer put it, in the x86 Program Files. After a few hours I did move it to C, but there was no improvement. Since my last posts, I have been able to reproducibly make it show up to ADB and everything else though. I need to use "adb kill-server" and then run the emulator. When I then run "adb devices" it reloads adb, then sees the emulator. If I close the emulator, and re-run it, it will not show up on "adb devices". If I kill it, and then "adb devices" again it works will detect it. Is there a less annoying work-around? – Xantham Dec 12 '11 at 14:47
  • To be honest, I've never used the adb as such. Did you try the 64 bit versions of java and eclipse? I'm not sure if trying can help, but atleast you'd have given your best to make it work. Please try it once and see if it works. I'm not really sure what else to do. Running it shouldn't have been this difficult. I've installed and run it on roughly 5 different systems and I haven't faced these problems. – Ghost Dec 13 '11 at 04:58
  • Just put the 64-bit versions of java and eclipse again. No significant change. My workaround still works, but it still won't work without it. How do debug and step through your code on your device or the emulator without using adb? – Xantham Dec 14 '11 at 20:40
  • http://developer.android.com/guide/developing/tools/emulator.html http://developer.android.com/guide/developing/tools/adb.html all i can do is provide you with these links. I'm sorry that I don't really know any other way. – Ghost Dec 15 '11 at 05:06
  • Try installing android through netbeans. http://www.wibit.net/curriculum/courses/programming_java#lesson-589 – Ghost Dec 16 '11 at 08:20