0
点赞
收藏
分享

微信扫一扫

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )


文章目录

  • ​​一、报错信息​​
  • ​​二、解决方案​​






一、报错信息


Android 应用编译时 , 报如下错误 :

Build-tool 31.0.0 is missing DX at Y:\001_DevelopTools\002_Android_SDK\build-tools\31.0.0\dx.bat

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

* Try:
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.

* Get more help at https://help.gradle.org

BUILD FAILED in 43s

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具






二、解决方案


点击顶部的 SDK Manager 图标 , 打开 SDK Manager ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_android_02

打开后 , 选择 SDK Tools 面板 :

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具_03

错误提示 Build Tools revision 31.0.0 出现错误 , 这里先取消 编译工具 31.0.0 版本勾选 , 选择 Apply -> OK 卸载该工具 ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_android_04

提示删除该编译工具的 31.0.0 版本 ,
【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具_05

删除中 …
【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具_06
删除完成 ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_java_07

然后再勾选 31.0.0 编译工具 , 选择 Apply -> OK 选项 ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_java_08

提示安装 , 选择 OK ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具_09
等待该工具自动安装完成 ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_android_10

安装完成 , 选择 Finish 选项 ;

【错误记录】Android 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted. Remove and install again )_编译工具_11

上述操作完成后 , 可以编译通过 ;

举报

相关推荐

0 条评论