-->

App not showing in launcher

2019-03-30 02:18发布

问题:

After installing an app via the run command on Android Studio, the app launches correctly, I can see it in the applications list and account manager. The problem is that it doesn't show up at all in the app launcher. (I have Google Launcher installed on the Nexus 5 device which I am testing on and everything was working fine before 6.0.1). App name is "Pumpkin".

Here is the manifest

And here's the screenshot where Pumpkin's supposed to fit.

回答1:

Your Intent-Filter seems to be wrong. Change to:

<activity
       android:name="com.pumpkin.activities.SplashScreenActivity"
       android:label="@string/app_name"
       android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <data android:scheme="pumpkin.com" android:host="open" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>


回答2:

Add this intent filter to your splash screen activity:

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