Reputation: 41
Whenever I install my App, wether via Androidstudio or via APK, it is shown twice on my phone. What causes this? I suppose this won't happen anymore when its installed via Play Store?
NOW I HAVE TO ADD MORE TEXT BECAUSE WTF STACKOVERFLOW.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.zawarudo">
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="@drawable/thatched"
android:label="Norse Expansion"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="portrait"
android:resumeWhilePausing="true"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GameActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape"
android:resumeWhilePausing="true"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Upvotes: 0
Views: 276
Reputation: 382
You have defined two activities as your launcher in your manifest file change one of them from
<category android:name="android.intent.category.LAUNCHER" />
To
<category android:name="android.intent.category.DEFAULT" />
Upvotes: 1
Reputation: 74
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
This segment of xml can only appear once in your whole application. Make sure you don't have another "conflicting" manifest (.aar, Unity embedded application, etc.) that also has this. If it has, discard it.
Source that helped me when I had the same issue : https://answers.unity.com/questions/1362683/unity-apk-installing-2-icons.html
Upvotes: 1