Gradle sync failed: failed to find Build Tools revision 21.1.2

时间:2023-12-11 17:13:32

从github上下载了一个开源项目到Android Studio

出现以下问题:

下午2:56:05 Gradle sync started
下午3:00:11 Gradle sync failed: failed to find Build Tools revision 21.1.2
Consult IDE log for more details (Help | Show Log)

解决办法:

查找SDK安装目录\build-tools 下查看自己的BuildTools 版本,然后修改项目为该版本

android {
compileSdkVersion 21
buildToolsVersion "23.0.2"(本地版本为23.0.2)
  ...