Gradle Sync Failed Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'

前端 未结 5 736
野性不改
野性不改 2020-12-31 22:28

I am unable to build a project in Android Studio and I am receiving the following errors.

  1. Gradle Sync Failed.
  2. Could not GET \'https://dl.google.com/dl
5条回答
  •  一整个雨季
    2020-12-31 23:11

    I found the solution.

    • The problem was I set proxy details of my University proxy server for internet access in Android Studio. When this problem appeared I tried build the project with proxy on internet connection with proxy but it did not work.
    • Then I removed the proxy from Android Studio preferences and connected to non-proxy internet connection but the problem did not disappear.
    • Then I Googled a lot and came here but could not find the root cause.
    • I updated AS from 3.1.3 to 3.2 but the problem still persisted.
    • Finally, I started looking for hidden proxy server details in AS and found them in gradle.properties file located Gradle -> Resource Bundle 'gradle' -> gradle.properties.
    • Deleted the proxy server details in this file and ran the build with successful completion after performing some packages update on the suggestions Android Studio.

    Bingo!

提交回复
热议问题