CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
Hi,
Its been a long time since I'm trying to fix this issue. I'm unable to build the scene because of the following error. Any help will be appreciated.
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:/Program Files/Java/jdk1.8.0_60\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android SDK\tools" -Dfile.encoding=UTF8 -jar "D:\Unity 3d 5.3.5\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
] stdout[ Warning: [Temp\StagingArea\AndroidManifest-main.xml:1, E:\Unity Projects Release\Night\Temp\StagingArea\android-libraries\play-services-maps-8.1.0\AndroidManifest.xml:7] Main manifest has but library uses glEsVersion='0x00020000' Note: main manifest lacks a declaration, and thus defaults to glEsVersion=0x00010000. ] 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()
Answer by liortal · Nov 07, 2016 at 07:52 AM
Main manifest has but library uses glEsVersion='0x00020000' Note: main manifest lacks a declaration, and thus defaults to glEsVersion=0x00010000
You have an AndroidManifest (probably under Assets/Plugins/Android) that doesn't specify the glEsVersion element, thus defaults to 0x00010000.
Another library you're using does define this value in its AndroidManifest (with a value of 0x00020000).
When Unity is producing the APK, it merges all the manifests together into a single one. When approaching this particular scenario, it cannot know which value should be used, so it fails.
The simplest fix would be to define this element in your main AndroidManifest file with the same value as the library (e.g: 0x00020000). Then you will not have any merge conflicts and it should work fine.