Android: I launch my app with Android Studio on the device and the icon is shown 2 times

1

The moment in which I launch my app with Android Studio on my device, two icons of the same app are created.

I already tried to export the apk and install it but it did not work, keep creating two icons of the same application.

Why does this situation happen? I do not know if you have to configure something in the Android Studio for it.

    
asked by devjav 24.11.2016 в 21:43
source

1 answer

4

Check that only one of your Activity defined in AndroidManifest.xml should have the intent-filter defined with action.MAIN and category.LAUNCHER :

<activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    
answered by 24.11.2016 / 22:11
source