Gradle 打包 报错 Exception in thread “main” java.io.IOException: Unable to tunnel through proxy.

Gradle 打包 报错 Exception in thread “main” java.io.IOException: Unable to tunnel through proxy. Proxy returns"Gradle 打

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信