UE4 安卓打包失败“Build-tool 31.0.0 is missing DX”
Posted 雪靡
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UE4 安卓打包失败“Build-tool 31.0.0 is missing DX”相关的知识,希望对你有一定的参考价值。
UATHelper: 打包 (android(多个:ASTC,DXT,ETC2)): Build-tool 31.0.0 is missing DX at D:\\Android\\sdk\\build-tools\\31.0.0\\dx.bat
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): FAILURE: Build failed with an exception.
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): * What went wrong:
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): > Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): * Try:
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): * Get more help at https://help.gradle.org
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): BUILD FAILED in 35s
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): ERROR: cmd.exe failed with args /c "E:\\code\\Unreal\\MyFPS\\Intermediate\\Android\\armv7\\gradle\\rungradle.bat" :app:assembleDebug
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): (see C:\\Users\\zmk\\AppData\\Roaming\\Unreal Engine\\AutomationTool\\Logs\\d+Epic+Games+UE_4.27\\Log.txt for full exception trace)
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: 打包 (Android(多个:ASTC,DXT,ETC2)): BUILD FAILED
分析
Build-tool 31.0.0 is missing DX
解决
Build Tool 31 以后从SDK内删除了DX工具,使用D8工具来替代DX工具。
解决方法有:
- 使用build tool 30。
- 从build tool 30内复制DX工具到build tool 31。
- 升级Android Gradle Plugin 到7.x
这里选择的是第一种方法。
选择编辑=>项目设置=>平台=>Android SDK,修改SDK API Level为30.0.3.1
Android Studio error “Installed Build Tools revision 31.0.0 is corrupted” - Stack Overflow https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted ↩︎
以上是关于UE4 安卓打包失败“Build-tool 31.0.0 is missing DX”的主要内容,如果未能解决你的问题,请参考以下文章