idea 出现gradle下载包下载不下来idea提示com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not download jvm https.proxyHost 127.0.0.1 Connection refused

  |   0 评论   |   0 浏览
com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not download guava.jar (com.google.guava:guava:19.0)
Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar'.
Could not HEAD 'https://repo.maven.apache.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar'.
Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused)
Connection refused (Connection refused)
> Could not download guava.jar (com.google.guava:guava:19.0)
  Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar'.
  Could not HEAD 'https://repo.maven.apache.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar'.
  Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused)
  Connection refused (Connection refused)

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html


google了一下

是因为频繁开启代理关闭代理导致的

解决方案1

Help -> Edit Custom VM Options

添加

-Dhttp.proxyHost
-Dhttp.proxyPort
-Dhttps.proxyHost
-Dhttps.proxyPort
-DsocksProxyHost
-DsocksProxyPort

然后重启idea就好了

解决方案2

在项目目录下点击File-> Invalidate Caches 清除缓存 然后重新打开idea后 gradle 会重新build项目 然后就可以了

image.png


标题:idea 出现gradle下载包下载不下来idea提示com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not download jvm https.proxyHost 127.0.0.1 Connection refused
作者:不断努力的青春
地址:http://songaw.com/articles/2022/03/03/1646291242470.html