------------恢复内容开始------------
报错原因:
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'
网上说的解决方法都无效,增加了SS代理也无
折腾了一会儿,好像可以了。
把项目中的build.gradle中Google()和jcenter()注释掉,换成阿里云的就可以了。将AndroID Studio中所有的代理全部取消另外将~/.gradle/gradle.propertIEs中关于代理的内容全部注释掉。build.gradle内容改为如下:
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { //Google() //jcenter() maven { url 'https://maven.aliyun.com/nexus/content/repositorIEs/Google' } maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositorIEs/jcenter'} } dependencIEs { classpath 'com.androID.tools.build:gradle:3.5.3' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}allprojects { repositorIEs { maven { url 'https://maven.aliyun.com/nexus/content/repositorIEs/Google' } maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositorIEs/jcenter'} //Google() //jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}
------------恢复内容结束------------
总结以上是内存溢出为你收集整理的Android Studio3.5在编译项目出现连接不上gradle该怎么办?全部内容,希望文章能够帮你解决Android Studio3.5在编译项目出现连接不上gradle该怎么办?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)