简体   繁体   中英

Cannot merge manifests inside Unity for Tango and Cardboard build

I've been doing some tests and tutorials from the Project Tango site . I was doing one that mixes both Tango and Cardboard inside Unity to make a VR experience using Tango.

I got a problem during the build phase, this is the message I receive everytime I try to build the APK and in the tutorial they dont mention any change or errr that may happend:

CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.  C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M
-Dcom.android.sdkmanager.toolsdir="C:/Users/Fer/AppData/Local/Android/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:4, C:\Users\Fer\Desktop\PruebaTango\TangoVR\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='22'> but library uses targetSdkVersion='24' ] 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.HostView:OnGUI()

I have updated Unity, Android Studio, set Android Studio to use the correct API that are mentioned in the default manifests, also updated the JDK.Also I have checked if there is repeated code on both manifests, etc.

Any help would be appreciated.

Thanks

I don't know about Project Tango, but the error you're getting says that the SDK versions of your main AndroidManifest.xml (you either have it in your plugins/android directory or Unity provides you with a default one on build) and your AAR libraries are mismatching and incompatible. My experience with cardboard tells me the min SDK is ridiculously high, and there's no way around it, so I had to drop cardboard support from one of my applications. Anyway, to fix the error, set your minimum and target SDK versions (in the build settings or your custom AndroidManifest) to be equal to the library's, version 24 in your case, as apparent from:

Main manifest has but library uses targetSdkVersion='24' ]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM