在构建VR App到Android时无法合并android清单

时间:2017-01-04 08:05:54

标签: android unity3d

当我尝试为Android构建VR应用程序时出现以下错误。我使用Unity 5.4.1f1,我已经下载了Java SE和SDK。我已经安装了Android 5.0.1软件包,但是当我尝试在Unity上构建和运行时,我收到了这个错误:

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="C:/Program Files (x86)/Android/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:14, C:\Users\Peno\Desktop\testVR\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.BuildPlayerWindow:BuildPlayerAndRun()

1 个答案:

答案 0 :(得分:0)

错误的相关部分是:

Main manifest has <uses-sdk android:targetSdkVersion='22'> but library uses targetSdkVersion='24'

请检查所有AndroidManifest文件(通常在插件/ Android下)以获取该行

<uses-sdk android:targetSdkVersion="22" />

从22变为24

注意:如果您正在尝试为DayDream VR构建,则可能需要下载不同版本的unity。请查看https://unity3d.com/de/partners/google/daydream以获取更多信息。