Could not resolve com.android.tools.build:gradle:8.0.1 错误的解决办法

2023年09月15日

使用最新版本的Android Studio (2022.2.1 patch 1)进行项目编辑的时候会提示

* What went wrong:
A problem occurred configuring root project 'xxxx'.
> Could not resolve all files for configuration ':classpath'.
  > Could not resolve com.android.tools.build:gradle:8.0.1.

解决办法,更换 JDK 版本为17或11。

 macOS 下

Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle

 Windows 下

File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle
 

enter image description here

 

© 1987 - 2023 张晓刚 版权所有

浙ICP备16002143号-1