Error:Unable to tunnel through proxy. Proxyreturns "HTTP1.1 400 Bad Request"

    xiaoxiao2021-12-14  17

    以前一直以为这个问题是这样子解决的,但是用了一轮,突然发现,不管用了。。。

    后来又找了个方法:

    gradle-wrapper.properties:

    #Mon Dec 28 10:00:20 PST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

    把distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip改成你本机所有的,这种问题就是gradle的版本不一致,不知道是什么自己的版本的话,你自己随便生成的项目找到这个文件就可以看到了。

    但还是不行的话,打开build.gradle   更改dependencies:

    dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } 低版本的会出现问题,更换成你现在的版本,最简单你自己新建一个项目,查看这个位置是多少版本。我的是 classpath 'com.android.tools.build:gradle:2.2.1'

    同步,就OK了。

    出现了一下的问题:

    Error:Failed to find Build Tools revision 23.0.0 rc2 <a href="install.build.tools">Install Build Tools 23.0.0 rc2 and sync project</a>

    解决方法是:

    由于是导入别人的项目,中途卡住了,有些地方看不到,直接全项目搜索ctrl+H,搜索23.0.0 rc2,通常就是编译版本问题

    buildToolsVersion "23.0.0 rc2" 改成你想要的就ok。

    转载请注明原文地址: https://ju.6miu.com/read-964986.html

    最新回复(0)