Gradle 打包 报错 Exception in thread “main” java.io.IOException: Unable to tunnel through proxy. Proxy returns"
- Gradle 打包 报错 Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns"
- 解决方案
- 方案1:
- 方案2:
Gradle 打包 报错 Exception in thread “main” java.io.IOException: Unable to tunnel through proxy. Proxy returns"
Android Gradle 使用命令 gradlew 打包时,遇到错误Exception in thread “main” java.io.IOException: Unable to tunnel through proxy. Proxy returns
如图所示:
很明显,就是proxy代理设置出了问题。
但是,proxy 代理在哪里设置呢,从网上所有搜索文章来看,所有的解决方案都是叫你在以下目录去寻找
“C/Users/用户名/.gradle/gradle.properties”然后删除对应的代理或者重新设置代理地址,再试试
这里告诉大家。这个办法不一定是对的。
解决方案
方案1:
依然在C/Users/用户名/.gradle/gradle.properties,中删除对应代理试试
方案2:
如果方案1,依然不能解决问题
请检查你工程里面 gradle/wrapper/gradle-wrapper.properties 文件中
字段:“distributionBase=环境变量”,检查该环境变量的目录
真正影响的你代理的配置文件就在这个目录下的gradle.properties中。
找到后,删除相应的代理配置即可。再试试。
希望能帮助大家。
发布者:admin,转转请注明出处:http://www.yc00.com/web/1755027111a5228399.html
评论列表(0条)