Could not GET ‘https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.31/kotlin-gradle-plugin-1.3.31.pom’. Received status code 400 from server: Bad Request
Enable Gradle ‘offline mode’ and sync project
经查,归根结底是网络问题。需要检查网络的配置,主要3个地方:
- 电脑的全局配置,比如mac os中网络偏好配置中,可以直接设置网络代理;
- gradle的全局配置,默认位置为/User//.gradle/gradle.properties中,在AS中可以在如下位置找到
- AS内部设置的代理:
如果发生前述问题,需检查上述所有的网络设置,再逐步定位问题。