I encountered a problem when creating a project in Android Studio, the error log is as follows.
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring root project ‘My Application’.
Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve com.android.tools.build:gradle:4.1.2.
Required by:
project :
Could not resolve com.android.tools.build:gradle:4.1.2.
Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom’.
Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom’. Received status code 400 from server: Bad Request
Could not resolve com.android.tools.build:gradle:4.1.2.
Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom’.
Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom’. Received status code 400 from server: Bad Request