解决方案:
根据构建报错信息 "31.0.0版本的构建工具缺少了DX文件" 发现,31.0.0版本的构建工具缺少了"dx.bat"和"dx.jar"这两文件,正确的做法就是复制对应路径的"d8.bat"和"d8.jar"这两文件创建副本,并分别改名为"dx.bat"和"dx.jar"【该方法同样适用于34.0.0版本问题】,"d8.bat"和"d8.jar"这两文件的大致路径为:
C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0\d8.bat => dx.bat C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0\lib\d8.jar => dx.jar
参考链接:https://blog.csdn.net/weixin_41579872/article/details/131397348
标签:bat,corrupted,jar,31.0,34.0,Build,dx,d8 From: https://www.cnblogs.com/open-coder/p/17937270