- Home /
Unity Android Manifest error during Apk Build
Hi , i recently update to Unity 5.2 (non beta ) version and i have free license . Earlier i was working with unity 5.1 and was using Unity Adds SDK and after i upgraded to 5.2 i deleted that SDK from standard assets and started using the built in Unity Add feature . But when i try to build apk now i get following errors in my console and my build process is terminated . By the looks of it , it seems something related to unity adds . I am lost here and would appreciate any kind of help . Thanks !
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/abhijeet-zu452/Desktop/Android SDK/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
Error: [Temp/StagingArea/AndroidManifest-main.xml, /Users/abhijeet-zu452/Desktop/Bullet vs Time/Temp/StagingArea/android-libraries/unityads-release/AndroidManifest.xml:8] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.ads.android.view.UnityAdsFullscreenActivity] element:
<activity
@android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
-- @android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-- @tools:ignore="UnusedAttribute">
--</activity>
<activity
@android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
++ @android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
++</activity>
++(end reached)
]
stdout[
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
Error: [Temp/StagingArea/AndroidManifest-main.xml, /Users/abhijeet-zu452/Desktop/Bullet vs Time/Temp/StagingArea/android-libraries/unityads-release/AndroidManifest.xml:8] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.ads.android.view.UnityAdsFullscreenActivity] element:
UnityEditor.HostView:OnGUI()
Error building Player: CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/abhijeet-zu452/Desktop/Android SDK/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity.app/Contents/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
Error: [Temp/StagingArea/AndroidManifest-main.xml, /Users/abhijeet-zu452/Desktop/Bullet vs Time/Temp/StagingArea/android-libraries/unityads-release/AndroidManifest.xml:8] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.ads.android.view.UnityAdsFullscreenActivity] element:
<activity
@android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
-- @android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-- @tools:ignore="UnusedAttribute">
--</activity>
<activity
@android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
++ @android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
++</activity>
++(end reached)
]
stdout[
]
Ok so i deleted the Android and IOS folder from plugins folder and turn off the Unity Adds under unityservices tab and then imported Unity adds SD$$anonymous$$ from asset store and built the apk , all went fine not sure why unity screwing up when using inbuilt stuff
Yes I had the same problem and solved as abhijeet has done. Deleted folders, closed unityads from editor services. Import new UnityAds from store apk has been built after that. Beware you can't turn on the built in ads even after importing stuff from store. I think it makes sense... $$anonymous$$inda.
just don't forget to initialize the ads with new GameID at the start of the game. Because u are killing built in initialize, you need to do it manually.
Nonetheless it is a bug.
Answer by pravinbudharap · Jan 20, 2017 at 08:48 AM
turn on the unity ads from service tab and remove
-- this activity from main android manifest and build the apk .. i hope it is helpful to everyone..!!!
Answer by SavageProgrammer · Jun 19, 2021 at 11:46 AM
@pravinbudharap I am not using Unity Ads but still getting the same error any solution?
Your answer
![](https://koobas.hobune.stream/wayback/20220612035056im_/https://answers.unity.com/themes/thub/images/avi.jpg)