App not showing in launcher

感情迁移 提交于 2019-12-03 13:11:58

问题


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>



回答3:


your deep link

https://sureassure.com

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".Main2Activity">

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

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data android:scheme="https"
                android:host="sureassure.com"     // website name
                />

        </intent-filter>

    </activity>
</application>



来源:https://stackoverflow.com/questions/34392538/app-not-showing-in-launcher

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!