Android App Development: Two icons getting created and I only need one Android App Development: Two icons getting created and I only need one android android

Android App Development: Two icons getting created and I only need one


Does your application manifest list an intent filter under your sub-activity that matches the main launcher?

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

Make sure that your sub-activity is not filtering for these intents.

Edit: Just to be very clear, make sure the above lines are not listed under your sub-activity. That intent filter lets the Android system know that you intend for it to be listed as an entry point to your application.


We have the same problem but i fixed it this waybefore my code below in manifest

<application        android:debuggable="true"        android:allowBackup="true">        <activity        android:name=".SplashActivity">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>        <activity            android:name="com.noupdate.apptest_noupdate.MainActivity"            android:icon="@drawable/ic_launcher"            android:label="@string/app_name">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>    </application>

Notice that in the SplashActivity inside the intent is this code

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

i only deleted the category

 <category android:name="android.intent.category.LAUNCHER" />

So after i deleted the intent-filter category in splash it didn't install two app icon but only one for main the code will be like this notice that the intent-filter category is deleted

<application        android:debuggable="true"        android:allowBackup="true">        <activity     android:name=".SplashActivity">            <intent-filter>                <action android:name="android.intent.action.MAIN" />            </intent-filter>        </activity>        <activity            android:name="com.noupdate.apptest_noupdate.MainActivity"            android:icon="@drawable/ic_launcher"            android:theme="@android:style/Theme.NoTitleBar"            android:label="@string/app_name">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>    </application>

it really helps


It creates two App icon because you must have added the given filter to two of your activities. See manifest.

<category android:name="android.intent.category.MAIN" />

Remove the above statement from the other one. Then you are good to go.