Could not resolve com.android.tools.build:gradle:7.4.2.

Android Studio reports an error when creating a new project

Could not resolve com.android.tools.build:gradle:7.4.2.

Reason: The default JDK version of Android Studio is inconsistent with the JDK required by Gradle configured in the project, resulting in a conflict

Solution: Go to Preferences->Build, Execution, Deployment->Build Tools->Gradle, change the Gradle user home and the Gradle JDK of the project to the same version directory

insert image description here

おすすめ

転載: blog.csdn.net/some_man/article/details/129931840