1

I am new to Android development and having very hard time running my first "Hello World" application. I downloaded ADT Bundle from http://developer.android.com/sdk/index.html. Created a project, but not able to run it at all. There are 2 issues,

1) In Eclipse, when I click "Run -> Run", nothing happens. Nothing runs

2) Looking around on internet, few times, I managed to "Run". But then the imulator opens, I can see shiny "Android" word appearing, but nothing happens after that. Tried to fix that from some internet tips and back to Issue 1 (nothing runs)

The Bundle I downloaded is for Android 4.2.2, API Level 17. Tried various settings for RAM (512MB, 256 MB), Internal storage (100MB, 200MB, 512MB), SD Card size (512MB, 2GB), Device (e.g. 3.7" FWVGA slider etc). Felt like I am hitting in dark. Few times killed adb.exe from task manager, few times deleted "avd" folder from "c:\Users\.android" to address either of the above 2 issues, but no luck.

Please help.

Nova Entropy
  • 5,727
  • 1
  • 19
  • 32
  • 2
    The Android emulator is very slow. Give it some more time, and see if it appears. – Nova Entropy Mar 30 '13 at 12:23
  • 1
    Window -> Show View > Console. It would should you the current status of the Emulator and you can see if your app is being installed on the device or not. – Swayam Mar 30 '13 at 12:34
  • Do what tristan and swayam are saying. And show your code. it may happen that you are displaying hello world on console and searching it on your emulator. – D'yer Mak'er Mar 30 '13 at 12:44
  • Thanks Swayam. I clicked on "Run", nothing happened. Waited for few minutes, still nothing happened, but I can see adb.exe process in Windows Task Manager. – AndroidJoker Mar 30 '13 at 12:57
  • Clicked on "Run" again. That started the emulater. Displayed the shining "Android" sign, but no sign of running my application for about 10 minutes – AndroidJoker Mar 30 '13 at 12:59
  • I am making some progress with your help !! I let the emulater run for few minutes and I have got this error on Console - [2013-03-30 13:01:43 - Trial1] Installing Trial1.apk... [2013-03-30 13:03:53 - Trial1] Failed to install Trial1.apk on device 'emulator-5554! [2013-03-30 13:03:53 - Trial1] (null) [2013-03-30 13:03:53 - Trial1] Launch canceled! – AndroidJoker Mar 30 '13 at 13:11

2 Answers2

0

I'm also writting my first app on Windows and it didn't run on the emulator, I saw ur post and after several tries and hours, it did work, so I came to tell what I did hoping it'd be useful for u:

After trying and trying with the emulator, I plugged a friend's cellphone who has an android lg l9, it did in fact installed all drivers without me looking for them (Windows XP SP3, nuts I know but it's my job computer). So I plugged it in and try to run as the documentation says and nothing. But in the left side there's a "Package explorer" tab with the name of the projects (if it's not visible, open it at ''Window->Show->Package Explorer''), so right click on urs and there u'll find the "Run as" option, choose "Android application" (again I thought crap, like this is any different than that big play icon up there i pressed before), but this time it worked!!! The app showed in the real cellphone. And then I tried again using the play icon that didn't work before, and now it works, console shows activity and stuff. For the record, my friend chose the option "Media storage" in the cellphone, when prompted right after we plugged his phone to the computer.

But the most surprising thing is, after that, I unplugged the cellphone, opened an AVD emulator just as the manual says (http://developer.android.com/training/basics/firstapp/running-app.html) and voila, emulator is now running the example app. So I'd really hate to think that a developer needs to do this in order to test apps, of course if u want ur app to go public u'll have to test it for real anyway, but go figure how many bugs left r inside this adt bundle.

I really hope this works for u.

donluismx
  • 1
  • 2
0

I don't know why, but I had to close & re-open the Android Virtual Device Manager again, and it had a dialog asking about LogCat. When I pushed yes, it started working. Not sure why. Must have been in some sort of glitched IDE state. (Tested Ubuntu 14.04)

Jonathan
  • 6,741
  • 7
  • 52
  • 69