gpt4 book ai didi

android - Unity 3d android构建错误

转载 作者:行者123 更新时间:2023-11-29 00:27:49 25 4
gpt4 key购买 nike

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

Error building 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()

Exception: Error building 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 () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/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 has been thrown by the target of an invocation. 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[] parameters) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:225) UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:218) UnityEditor.HostView.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:119)

我不知道如何修复它。

在 Unity 4.2.0 中,它不会给我任何错误,但在 3.4.2 中,即使项目仅包含主相机和立方体,它也会给我这些错误,并且未构建 .apk 文件。我该如何解决这个问题?

最佳答案

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

关于android - Unity 3d android构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18102334/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com