首页 文章

Unity 3d android构建错误

提问于
浏览
2

当我尝试构建.apk文件时,它给出了以下2个错误:

构建Player时出错:Win32Exception:ApplicationName ='C:/ Users / Teodor / AppData / Local / Android / android-sdk / platforms / android-18 \ aapt.exe',CommandLine ='package -v -f -m -J gen -M AndroidManifest.xml -S“res”-I“C:/ Users / Teodor / AppData / Local / Android / android-sdk / platforms / android-18 \ android.jar”-F bin / resources.ap_', CurrentDirectory ='Temp / StagingArea'UnityEditor.HostView:OnGUI()

异常:构建Player时出错:Win32Exception:ApplicationName ='C:/ Users / Teodor / AppData / Local / Android / android-sdk / platforms / android-18 \ aapt.exe',CommandLine ='package -v -f -m -J gen -M AndroidManifest.xml -S“res”-I“C:/ Users / Teodor / AppData / Local / Android / android-sdk / platforms / android-18 \ android.jar”-F bin / resources.ap_ ',CurrentDirectory ='Temp / StagingArea'UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings(Boolean askForBuildLocation,BuildOptions forceOptions)(at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:367)UnityEditor.BuildPlayerWindow.GUIBuildButtons(Boolean enableBuildButton ,Boolean enableBuildAndRunButton,Boolean canInstallInBuildFolder)(at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:972)UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings()(at C:/ BuildAgent / work / 842f9557127e852 / Editor / Mono / BuildPlayerWindow.cs:953)UnityEditor.BuildPlayerWindow.OnGUI()(在C:/ BuildAgent / work / 842f9557127e852 / Editor / Mo no / BuildPlayerWindow.cs:726)System.Reflection.MonoMethod.Invoke(System.Object obj,BindingFlags invokeAttr,System.Reflection.Binder binder,System.Object [] parameters,System.Globalization.CultureInfo culture)Rethrow as TargetInvocationException:Exception已经被调用的目标所抛出 . System.Reflection.MonoMethod.Invoke(System.Object obj,BindingFlags invokeAttr,System.Reflection.Binder binder,System.Object [] parameters,System.Globalization.CultureInfo culture)System.Reflection.MethodBase.Invoke(System.Object obj, System.Object []参数)UnityEditor.HostView.Invoke(System.String methodName,System.Object obj)(在C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:225)UnityEditor.HostView . Invoke(System.String methodName)(在C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:218)UnityEditor.HostView.OnGUI()(在C:/ BuildAgent / work / 842f9557127e852 / Editor /单声道/ GUI / DockArea.cs:119)

我不知道如何解决它 .

在Unity 4.2.0中,它没有给我任何错误,但是在3.4.2中,即使项目只包含主摄像头和一个立方体,它也会给我这些错误并且不会构建.apk文件 . 我该如何解决这个问题?

3 回答

  • 0

    尝试在Android SDK目录中搜索aapt.exe文件 . 在更高版本中,它被移动到android-sdk / build-tools / 18.0.0 / . 看那里,如果你找到它,从那里复制到你的android-sdk / platforms / android-18文件夹 .

  • 1

    我有一个非常类似的错误 . 为我解决的是使用Android SDK Manager安装Android SDK Build Tools .

  • 1

    在Android sdk -18中引入了一些新工具,因此旧的统一版本将无法与新的Android工具一起使用,因为大多数工具都已更改 .

相关问题