CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“D:/PROJECTS/AndroidStudioProjects/sdk\tools” -Dfile.encoding=UTF8 -jar “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar” -
stderr[
]
stdout[
Warning: [Temp\StagingArea\AndroidManifest-main.xml:14, E:\Kleart-01\Temp\StagingArea\android-libraries\UnityAds\AndroidManifest.xml:3] Main manifest has but library uses targetSdkVersion=‘23’
]
exit code: 1
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.BuildPlayerWindow:BuildPlayerAndRun()
— This is the 2rd Error on console —
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
UnityEditor.Android.PostProcessor.PostProcessorContext.Get[String] (System.String key)
UnityEditor.Android.PostProcessor.Tasks.PublishPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.Launch (BuildTarget target, System.String installPath)
UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (BuildLaunchPlayerArgs args)
UnityEditor.PostprocessBuildPlayer.Launch (BuildTarget target, System.String path, System.String productName, BuildOptions options) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:151)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
— This is the 3rd Error on console —
KeyNotFoundException: The given key was not present in the dictionary.
— Analysis —
It’s a VR app (GVR SDK 1.03 targeting Carboard android), I have API 19 as target so the first lines look weird : “Main manifest has but library uses targetSdkVersion=‘23’”
I had the manifest merge error when I used the services ads way to get ads, when I un-ticked it and removed my ad manager script the error vanished. Now I was using the Unity Ads SDK 2.0.8