ShreyashHK
ShreyashHK

Reputation: 13

I have disable the Gradles offline mode , and now there is a new error as below :

Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.jar'. Received status code 405 from server: Method Not Allowed Disable Gradle 'offline mode' and sync projectenter image description here

Upvotes: 1

Views: 751

Answers (2)

I was facing a similar issue with my Android Studio. This is happening due to a bad link in moven, In my case, I was using the given link which is not reachable now and giving 502 error.

  maven {
            url 'http://dl.bintray.com/amulyakhare/maven'
        }

Solution:- I have commented on my maven link and Sync my Gradle now it's working.

// maven {
//        url 'http://dl.bintray.com/amulyakhare/maven'
//    }

Explanation: if you are using any such link in your build.gradle then try to rectify from error. Comment your block of code and resync.

Upvotes: 0

Ray Hunter
Ray Hunter

Reputation: 15557

Make sure you do not have gradle offline mode enabled. Your gradle toolbar should look like the one below. The 4 icon from the left, is the toggle offline/online button. It should not be selected.

gradle toggle offline/online

You can run the actions like the following to do a gradle sync with your project.

gradle sync action

That should get you back online and your project synced up.

Upvotes: 1

Related Questions