Could not resolve all dependencies for configuration ':classpath'

后端 未结 23 1415
离开以前
离开以前 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:51

    In the Android Studio v4.0, you should be off the Gradle offline-mode and retry to sync Gradle.

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

    Go to File --> Invalidate Caches / Restart. It worked for me.

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

    Right, I'm not sure if it will work for others but worked for me.

    I changed proxyPort to 8080 and used jcenter instead of Maven. But I had to apply expeption to use HTTP instead of HTTPS. This is what I have in my build.gradle for build script and allprojects

    buildscript {
      repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
      }
    }
    
    allprojects {
    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
      }
    }
    

    UPDATE: 06/08

    I have recently updated Gradle and plugin version and had some problems. It was complaining about plugin com.android.application

    I did some digging around and changed

     jcenter {
        url "http://jcenter.bintray.com/"
    }
    

    to

    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
    
    0 讨论(0)
  • 2020-12-01 04:56

    6 years later here, but for them who are stil facing this issue, I solved it as following. It happened when my module had a different gradle version than the main project. I had gradle version 3.5.3 in project and an older version in module. So, I Just updated that version. The file is here:

    ./node-modules/[module-name]/android/build.gradle

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

    In my case deleting the .gradle folder worked for me.

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