I can't build my android project due to this error. Gradle failed to GET . Strange enough I am able to view the pom file behind this URL in my browser. What might be the problem here?
My gradle.properties look like this:
systemProp.http.proxyHost=myproxy.local
systemProp.http.proxyPort=3210
systemProp.https.proxyHost=myproxy.local
systemProp.https.proxyPort=3210
systemProp.http.proxyUser=usr
systemProp.http.proxyPassword=pwd
When I remove the proxyUser/Password I get an 407 Proxy Authentication Required.
6 Answers
For me this worked 1. Invalidate caches/restart 2. Sync project with gradle files
Your proxy needs authentication and the authentication you supply is invalid or your proxy does not allow to request that URL with the authentication details you supply.
You've only provided user/password for systemProp.http. You likely need to provide the same for systemProp.https
You need to reset android studio because we cannot get the sever response due to proxy matters. Close Android Studio. Please Go to C://Users/Username/. Then delete .gradle file and .Android Studio File. After Open Android Studio and set settings. I solved this problem using above steps.
check gradle offline mode under settings and check local gradle then specify the path of you gradle.zip file its under
Upgrading to Android X can fix the Forbidden! response problem.
- Open your project on Android Studio
- Top menu > Refactor > Migrate to AndroidX
- Don't forget backup your entire project before migrating.