Could not find com.android.tools.build:gradle:4.0.1 OR 4.0.0

前端 未结 1 1206
生来不讨喜
生来不讨喜 2020-11-30 15:02

Error :

Could not find com.android.tools.build:gradle:4.0.1. Searched in the following locations:

https://jcenter.bintray.com/com/android/tools/build/gradle/4.

相关标签:
1条回答
  • 2020-11-30 15:34

    this solution just work in iran

    go to -> File | Settings | Appearance & Behavior | System Settings | HTTP Proxy, and choose -> manual proxy configuration. set host name: fodev.org and set port number: 8118 . now you must find gradle.properties file. that must be in: Windows: C:\Users\YOURUSERNAME.gradle\gradle.properties OR for Linux: ~/.gradle/gradle.properties . if does't exist, create that yourself. and copy this :

    systemProp.http.proxyHost=fodev.org
    systemProp.http.proxyPort=8118
    systemProp.http.nonProxyHosts=*.jitpack.io, *.maven.org
    systemProp.https.proxyHost=fodev.org
    systemProp.https.proxyPort=8118
    systemProp.https.nonProxyHosts=*.jitpack.io, *.maven.org
    

    now you can sync project.

    IMPORTANT : after install build.gradle 4.0.1 (or every version), back this settings to before and remove codes

    0 讨论(0)
提交回复
热议问题