【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )

简介: 【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )

文章目录

一、报错信息

二、解决方案





一、报错信息


Executing tasks: [:dex_demo:assembleDebug, :app:assembleDebug] in project Y:\002_WorkSpace\001_AS\ClassLoader_Demo
AGPBI: {"kind":"warning","text":"Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.\nThis repository is deprecated and it will be shut down in the future.\nSee http://developer.android.com/r/tools/jcenter-end-of-service for more information.\nCurrently detected usages in: root project 'ClassLoader_Demo', project ':app', project ':dex_demo'","sources":[{}]}
Build-tool 31.0.0 is missing DX at Y:\001_DevelopTools\002_Android_SDK\build-tools\31.0.0\dx.bat
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 ':dex_demo: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 33s



image.png



二、解决方案


创建 Project 工程时 , 自动创建的 Module 其 build.gradle 为 如下属性 ,


android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"
}


创建 Module 时 , 生成的 build.gradle 为 如下属性 ,


android {
    compileSdkVersion 30
    buildToolsVersion "31.0.0"
}


将 buildToolsVersion 的版本 , 由 31.0.0 31.0.031.0.0 修改为 30.0.3 30.0.330.0.3 即可 ;


android {
    compileSdkVersion 30
    //buildToolsVersion "31.0.0"
    buildToolsVersion "30.0.3"
}


修改后 , 编译完成 ;


image.png


备选方案 : 按照


Remove and install again using the SDK Manager.


提示 , 卸载 Build-tool 31.0.0 并重新安装 ;


先卸载 , 再安装 ;


image.png

目录
相关文章
|
SQL 人工智能 Dart
Android Studio的插件生态非常丰富
Android Studio的插件生态非常丰富
895 1
|
Ubuntu Linux Android开发
Android Studio支持多种操作系统
Android Studio支持多种操作系统
688 1
|
11月前
|
开发工具 Android开发 iOS开发
如何在Android Studio中配置Flutter环境?
如何在Android Studio中配置Flutter环境?
2632 160
|
10月前
|
Android开发 Windows
Android studio 报错Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused: connect(已解决)
这是一篇关于解决Android Studio报错“Connect to 127.0.0.1:8888 failed: Connection refused”的文章。问题通常因系统代理设置被Android Studio自动保存导致。解决方法是找到系统中Android Studio使用的gradle.properties文件(位于Windows的C:\Users\你的电脑用户名\.gradle或Mac的/Users/.{你的用户目录}/.gradle),删除或注释掉多余的代理配置后保存并重新Sync项目。希望此经验能帮助快速解决同类问题!
1880 36
|
10月前
|
Java Android开发
Android studio中build.gradle文件简单介绍
本文解析了Android项目中build.gradle文件的作用,包括jcenter仓库配置、模块类型定义、包名设置及依赖管理,涵盖本地、库和远程依赖的区别。
868 19
|
前端开发 Java 编译器
当flutter react native 等混开框架-并且用vscode-idea等编译器无法打包apk,打包安卓不成功怎么办-直接用android studio如何打包安卓apk -重要-优雅草卓伊凡
当flutter react native 等混开框架-并且用vscode-idea等编译器无法打包apk,打包安卓不成功怎么办-直接用android studio如何打包安卓apk -重要-优雅草卓伊凡
407 36
当flutter react native 等混开框架-并且用vscode-idea等编译器无法打包apk,打包安卓不成功怎么办-直接用android studio如何打包安卓apk -重要-优雅草卓伊凡
|
Dart 前端开发 Android开发
【09】flutter首页进行了完善-采用android studio 进行真机调试开发-增加了直播间列表和短视频人物列表-增加了用户中心-卓伊凡换人优雅草Alex-开发完整的社交APP-前端客户端开发+数据联调|以优雅草商业项目为例做开发-flutter开发-全流程-商业应用级实战开发-优雅草Alex
【09】flutter首页进行了完善-采用android studio 进行真机调试开发-增加了直播间列表和短视频人物列表-增加了用户中心-卓伊凡换人优雅草Alex-开发完整的社交APP-前端客户端开发+数据联调|以优雅草商业项目为例做开发-flutter开发-全流程-商业应用级实战开发-优雅草Alex
422 4
【09】flutter首页进行了完善-采用android studio 进行真机调试开发-增加了直播间列表和短视频人物列表-增加了用户中心-卓伊凡换人优雅草Alex-开发完整的社交APP-前端客户端开发+数据联调|以优雅草商业项目为例做开发-flutter开发-全流程-商业应用级实战开发-优雅草Alex
|
前端开发 数据处理 Android开发
Flutter前端开发中的调试技巧与工具使用方法,涵盖调试的重要性、基本技巧如打印日志与断点调试、常用调试工具如Android Studio/VS Code调试器和Flutter Inspector的介绍
本文深入探讨了Flutter前端开发中的调试技巧与工具使用方法,涵盖调试的重要性、基本技巧如打印日志与断点调试、常用调试工具如Android Studio/VS Code调试器和Flutter Inspector的介绍,以及具体操作步骤、常见问题解决、高级调试技巧、团队协作中的调试应用和未来发展趋势,旨在帮助开发者提高调试效率,提升应用质量。
622 8
|
数据可视化 开发工具 Android开发
Android Studio
Android Studio
885 1
|
数据可视化 开发工具 Android开发
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
484 0
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )

热门文章

最新文章