# Apk file installes two instances of a Unity game

I created an apk in Unity (4.6) and when I install that apk on the device it creates 2 instances of the game (2 icons are visible in the screen). Both icons start the same game, and when I uninstall the game it removes both icons.

In previous builds this didn't happen, so I'm assuming that the changes I made to the Android Manifest have something to do with it. I included the Game Analytics SDK and it caused some problems when I tried to build the game for Android (with the message that the incompatible manifests can't be merged). So I commented out the part of the manifest that was causing the problem and now I have the problem with multiple instances of the game. I did some research and found that this happens when there are multiple activities in the manifest that are marked as LAUNCHER - this is not the case in my app, only one activity has that property. Also, as far as I can see, there is only one AndroidManifest.xml file in the Unity project (only one appears when I type it in the search).

This is the part of the manifest that I needed to change:

</activity>
<meta-data android:name="android.app.lib_name" android:value="unity" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>-->

If the commented out part is included, Unity throws the "incompatible manifest merge" error in the building process:

Error: [Temp\StagingArea\AndroidManifest-main.xml:4, [MyGame]Temp\StagingArea\android-libraries\unityads\AndroidManifest.xml:19] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.player.UnityPlayerNativeActivity] element:

UnityEditor.HostView:OnGUI()

Did anyone have any similar problems and how did you fix it?

Thanks

• – OMGtechy Mar 15 '15 at 12:36
• This solution worked - I excluded the following lines:  <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> And that solved the problem – NDraskovic Mar 15 '15 at 13:27