简体   繁体   中英

Android app compiles and installs, but won't show up in my apps

Has anyone seen an issue where you can export your app to an .apk file and you can install it and everything looks ok but the app never shows up in the list of installed applications. I have another app that installed and is running fine. Totally stumped by what I could be doing wrong... I think it's signed correctly (I've tested the key on the working app... am I missing something really stupid?)

EDIT I'm editing to add the solution. Android requires that the main Activity be called MAIN in the manifest. You can call your class anything you want but the XML has to include this:

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

Not realizing this, I had named mine something else and rather than just failing outright, it worked perfectly in the emulator, but failed to open on the phone.

You'll need to create an activity with android.intent.action.MAIN with android.intent.category.LAUNCHER, kind of like this:

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

For more information, see here: http://developer.android.com/guide/topics/manifest/manifest-intro.html (under Icons and Labels).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM