Androidstudio从APK安装的应用程序出现在手机上两次



每当我安装应用程序时,无论是通过Androidstudio还是通过APK,它都会在我的手机上显示两次。是什么原因造成的?我想当它通过Play Store安装时,这种情况不会再发生了?

现在我必须添加更多的文本,因为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>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

这段xml在整个应用程序中只能出现一次。确保你没有另一个";冲突的";manifest(.aar、Unity嵌入式应用程序等(也有这个功能。如果有,就丢弃它。

当我遇到同样的问题时,帮助我的来源:https://answers.unity.com/questions/1362683/unity-apk-installing-2-icons.html

您在清单文件中定义了两个活动作为启动器,将其中一个从更改

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

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

最新更新