Domanda

Why won't the app appear in the app drawer? It says in the App Manager that it is installed but I can't seem to open the actual app as it isn't in the app drawer. It doesn't automatically open it up once it's installed either.

Here is what is said when I choose to run on my phone (which is on Jellybean). It says the same thing when I install it to an emulator.

    [2012-09-19 16:20:24 - TheForeverAloneQuiz] Performing sync
    [2012-09-19 16:20:24 - TheForeverAloneQuiz] Automatic Target Mode: Several compatible targets. Please select a target device.
    [2012-09-19 16:20:28 - TheForeverAloneQuiz] Uploading TheForeverAloneQuiz.apk onto device '001988a8094d8e'
    [2012-09-19 16:20:28 - TheForeverAloneQuiz] Installing TheForeverAloneQuiz.apk...
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] Success!
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] /TheForeverAloneQuiz/bin/TheForeverAloneQuiz.apk installed on device
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] Done!

Here's the android manifest.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mikenning.foreveralonequiz"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Light.NoTitleBar" >
        <activity
            android:name=".Introduction"
            android:label="@string/title_activity_introduction" >
            <intent-filter>
                <action android:name="android.intent.action.INTRO" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".QuestionOne"
            android:label="@string/title_activity_introduction" >
            <intent-filter>
                <action android:name="android.intent.action.QUESTIONONE" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Result"
            android:label="@string/title_activity_introduction" >
            <intent-filter>
                <action android:name="android.intent.action.RESULTS" />

                <category android:name="android.intent.category.DEFAULT" />         
            </intent-filter>
        </activity>
    </application>

</manifest>

Anything I'm doing wrong?

SIDENOTE I also get errors saying that I do not need permission for the activities categorised as 'DEFAULT'. Could this be to do with it? I need it for the startActivity() in one of my clases so is it really not required?

È stato utile?

Soluzione

I'm assuming that introduction is your first Activity. You need to add another action to it, like in the following code:

    <activity
        android:name=".Introduction"
        android:label="@string/title_activity_introduction" >
        <intent-filter>
            <action android:name="android.intent.action.INTRO" />
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Altri suggerimenti

I know it is solved question, but this solution did not work for me and I wanted to share my solution here.

I was trying to add deep link support to my app, And in the documentation the

<intent-filter android:label="@string/filter_view_http_gizmos">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="gizmosexample"/>
</intent-filter>

I added those intent filters to my launcher activity and after app drawer stopped showing the app icon in the launcher.

So if @RaghavSood's solution above did not work, try to remove those filters or any other custom filters from the launcher activity's filters.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top