Could not resolve all dependencies for configuration ':classpath'

后端 未结 23 1414
离开以前
离开以前 2020-12-01 04:27

I cant seem to get build tools for the latest gradle at all. I suspect its something to do with proxy setting for gradle. I have had a good look online but still cant seem t

相关标签:
23条回答
  • 2020-12-01 04:42

    late but it worked for me:
    change your dns setting by going Network and sharing center.
    In left pane choose change adapter setting
    -right click on your network connection
    -properties
    -select ipv4
    -properties
    - now in dns server setting:-
    -choose the option use the following dns server addresses
    and use google dns server 8.8.8.8 as preferred dns server and 8.8.4.4 as alternate dns server.

    it will solve your problem.

    0 讨论(0)
  • 2020-12-01 04:43

    In my case, my Android Studio version was 3.6.1 and i have modified the classpath like below;

    classpath 'com.android.tools.build:gradle:3.6.1'
    

    and that error was gone.

    0 讨论(0)
  • 2020-12-01 04:43

    I got this issue solved by switching internet from Wifi to mobile hot-spot. It means this issue occurs due to network issue. I could also see below logs which confirms my understanding,

    Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection timed out: connect

    and

    Connect to repo1.maven.org:443 [repo1.maven.org/151.101.36.209] failed: Connection timed out: connect

    Hope it helps.

    0 讨论(0)
  • 2020-12-01 04:44
    • I am working with flutter in the VS Code.
    • In my case, I solved it by stopping gradlew process in VS code using the below command

      android/gradlew --stop

    0 讨论(0)
  • 2020-12-01 04:44

    Tools > SDK Manager > SDK Tools > Show Package Details and remove all the old versions

    0 讨论(0)
  • 2020-12-01 04:45

    Find and Replace:

    jcenter()
    maven {
        url "https://maven.google.com"
    }
    

    to:

    maven {
        url "https://maven.google.com"
    }
    jcenter()
    
    0 讨论(0)
提交回复
热议问题