tags:

views:

52

answers:

3

I am going through the Android Hello World, but when I go to Run > Run in Eclipse, it loads the emulator, takes a few moments, then loads the Android home screen. My app does not load automatically like the tutorial says, and I can't find it in the applications list.

How do I get my app to launch? What might I have done?

I am using Eclipse, and targeting Android 2.2

EDIT*

When I run the application from Eclipse, I get this output in the concole:

// Android Launch!
// adb is running normally.
// Performing com.adamharte.helloandroid.HelloAndroid activity launch
// Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
// Launching a new emulator with Virtual Device 'my_avd'

The emulator start on a black screen saying "android_" then shows a shimmering blue android logo, then goes to the "unlock" screen. I drag the lock to the right, and it goes to the android home screen. I can't find my "HelloWorld" app on any of the home screens, or applications list.

A: 

Normally, when you see the home screen on the emulator, it says "press menu to unlock" so make sure you do that.

Also, check what the console says (you should find this tab in Eclipse). It should indicate that it has installed the apk, and then it indicates it is launching the activity.

The full input should look similar to this

[2010-08-24 10:15:05 - Big Words] Android Launch!
[2010-08-24 10:15:05 - Big Words] adb is running normally.
[2010-08-24 10:15:05 - Big Words] Performing net.cogitas.bigwords.BigWords activity launch
[2010-08-24 10:15:08 - Big Words] Launching a new emulator with Virtual Device '16'
[2010-08-24 10:15:11 - Big Words] New emulator found: emulator-5554
[2010-08-24 10:15:11 - Big Words] Waiting for HOME ('android.process.acore') to be launched...
[2010-08-24 10:15:48 - Big Words] WARNING: Unknown device API version!
[2010-08-24 10:15:48 - Big Words] HOME is up on device 'emulator-5554'
[2010-08-24 10:15:48 - Big Words] Uploading Big Words.apk onto device 'emulator-5554'
[2010-08-24 10:15:49 - Big Words] Installing Big Words.apk...
[2010-08-24 10:16:04 - Big Words] Success!
[2010-08-24 10:16:04 - Big Words] Starting activity net.cogitas.bigwords.BigWords on device 
[2010-08-24 10:16:15 - Big Words] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=net.cogitas.bigwords/.BigWords }
FreewheelNat
Hmm, thanks for posting your output. any ideas why mine only has the first 5 or so lines?
TandemAdam
A: 

Did you do Run As Android Application the first time you ran the app? If you don't do that Eclipse can do the wrong thing.

Zaradaqaw
Yip, I selected "Android Application" from the list that popped up when I hit run.
TandemAdam
A: 

You have to make sure you have install the correct packages in the Android SDK and AVD Manager. To be safe just install all the available packages. You then have to make sure you have the correct path set to your SDK in Eclipse.

Also make sure you have made an Android Virtual Device (AVD) for the target you will be using.

To be extra save, run everything "as administrator" when you are installing or configuring.

TandemAdam