Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app not showing in the emulator

I installed eclipse, android sdk, created AVD (tried with different versions), then created simple hello world program (autogenerated).

When I run it, it supposed to load up and show helloworld screen... but nothing happens. Emulator just loads up and shows android main screen. My app is nowhere to be seen.

Log:

[2012-05-19 19:09:34 - GameTest] Android Launch!
[2012-05-19 19:09:34 - GameTest] adb is running normally.
[2012-05-19 19:09:34 - GameTest] Performing org.test.game1.GameTestActivity activity launch
[2012-05-19 19:09:34 - GameTest] Automatic Target Mode: launching new emulator with compatible AVD 'def_avd'
[2012-05-19 19:09:34 - GameTest] Launching a new emulator with Virtual Device 'def_avd'

And that's it...

What is wrong and how can I actually load up my program?

Some clarifications: I tried to run emulator beforehand, and then running my app. I tried running emulator directly from eclipse "Run as - Android application" but still the same exact thing.

like image 545
NewProger Avatar asked Dec 01 '22 22:12

NewProger


2 Answers

The thing missing is given below XML snippet in your AndroidManifest.xml

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Add this tag in your xml under activity tag, then your application will be launched on your Emulator

like image 63
Hitesh Avatar answered Dec 10 '22 12:12

Hitesh


Unfortunately nothing suggested in other replies helped, but I found a decent workaround.

If you have an android device probably the simplest thing to do would be to connect it to usb and just hit "debug as android application" and in 3 or 4 seconds it will load up on your android device.

To use that option you need to instal USB driver package, but that is no problem.

like image 27
NewProger Avatar answered Dec 10 '22 12:12

NewProger