Could not resolve all dependencies for configuration ':classpath'

后端 未结 23 1485
离开以前
离开以前 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条回答
  •  旧时难觅i
    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' }
    }
    

提交回复
热议问题