Unable to Merge Android Manifests at compile time

4.6k views Asked by At

I receive this error at compile time:

commandInvokationFailure: Unable to merge android manifests. See the Console for more details. 
/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/Nick/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

stderr[

]
stdout[
Warning: [Temp/StagingArea/AndroidManifest-main.xml:14, /Users/Nick/Desktop/OctiveVR/Temp/StagingArea/android-libraries/gvr-permissionsupport-release/AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='22'> but library uses targetSdkVersion='24'
]
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()
2

There are 2 answers

2
user7349265 On BEST ANSWER

haha,I just fix this issue yesterday!

I developer by Unity5.4.2GVR13. Firstly, under the folder "Plugins/Android" there are those files: AndroidManifest. xml AndroidManifest-cardboard .xml AndroidManifest-daydream .arr gvr-permissionsupport-resease

if you are developing with cardboardSDK,delete other three,for daydram is the same way.

Secondly, go File -> Build setting - > Player Setting - > minimum API level set to 19 for carboard,24 for daydream.

0
Hod On

You have a mismatch in your Android version requirements between the level specified in your main manifest and the version required by a library you're including.