0
\$\begingroup\$

I used Google Admob to put ads in my game but as soon as I hit build and run this error showed up I used a Github file and imported into my unity project, I will link it right here

https://github.com/unity-plugins/Unity-Admob.

CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/jayso/AppData/Local/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" - stderr[ Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-ads-10.2.0\AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion='14' Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-ads-lite-10.2.0\AndroidManifest.xml:7] Main manifest has but library uses minSdkVersion='14' Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-base-10.2.0\AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion='14' Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-basement-10.2.0\AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion='14' Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-gass-10.2.0\AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion='14' Error: [Temp\StagingArea\AndroidManifest-main.xml:21, C:\Users\jayso\OneDrive\Documents\Tap Happy\Temp\StagingArea\android-libraries\play-services-tasks-10.2.0\AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion='14' ] stdout[ ] 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()

\$\endgroup\$

1 Answer 1

-1
\$\begingroup\$

Your project is set to link with android version 14 (your main manifest oder in build settings), but the admob library uses another version. Try aligning those up

\$\endgroup\$
1
  • \$\begingroup\$ These problems can be hard to figure out because the version of multiple things have to line up. I'd start with making sure the JDK is up to date, your android studio files, and the admob plugin and Google Play Services. \$\endgroup\$ Apr 26, 2017 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .