Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android sample app not showing up

New Android developer here. I'm following a tutorial at http://www.vogella.de/. The first applications (does temperature conversion) works. The second (does preferences and uses a menu) one never shows up. I've tried using both Helios and Galileo. I've tried re-installing Android SDK. I've tried removing the test device and re-creating it. Others say this tutorial works.

When the other app works, it doesn't get the two lines "No Launcher activity found!" and "The launch will only sync the application packages on the device."

What I see:

------------------------------
...] Android Launch!
...] adb is running normally.
...] No Launcher activity found!
...] The launch will only sync the application package on the device!
...] Performing sync
...] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'TestDevice'
...] Uploading de.vogella.android.preferences.apk onto device 'emulator-5554'
...] Installing de.vogella.android.preferences.apk...
...] Success!
...] \de.vogella.android.preferences\bin\de.vogella.android.preferences.apk installed on device
...] Done!

UPDATE: here is the text from my Android manifest file

<manifest 
    xmlns:android="schemas.android.com/apk/res/android";
    package="de.vogella.android.preferences" 
    android:versionCode="1" 
    android:versionName="1.0"> 
    <application android:icon="@drawable/icon" android:label="@string/app_name"> 
        <activity android:name=".HelloPreferences" android:label="@string/app_name">
        </activity> 
        <activity android:label="Preferences" android:name="Preferences">
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="8" />
</manifest>
like image 800
Russ Bateman Avatar asked Dec 03 '22 11:12

Russ Bateman


1 Answers

Here's the answer, which I had to find elsewhere. It seems that you must have the following element:

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

inside your AndroidManifest.xml file. Once I added this, then right-clicked on the project name to launch the Android Application, the app then showed up in the menu panel.

Eclipse put this (intent-filter) element there for my first experimental application, but it did not do me the favor for the second one I created, which I'm still debugging for yet other (and probably Eclipse-related) reasons. (I probably filled something out wrong when creating the new Android project.)

like image 163
Russ Bateman Avatar answered Jan 10 '23 04:01

Russ Bateman