【问题标题】:./gradlew tasks gives me a "build scan failed due to network error 'java.net.ConnectException: Network is unreachable"./gradlew tasks 给了我一个\“由于网络错误\'java.net.ConnectException:网络无法访问\”
【发布时间】:2022-08-03 01:42:05
【问题描述】:

运行./gradlew tasks 时,尽管网络连接良好,但出现以下错误Publishing build scan failed due to network error \'java.net.ConnectException: Network is unreachable (connect failed)

这是完整的错误:

% ./gradlew tasks
Configuration cache is an incubating feature.
Configuration on demand is an incubating feature.
Calculating task graph as no configuration cache is available for tasks: tasks

0 problems were found storing the configuration cache.

See the complete report at file:///Users/.../configuration-cache-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type BuildCacheController using .createBuildCacheController().
   > Network is unreachable (connect failed)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 498ms

Publishing build scan...
Publishing build scan failed due to network error \'java.net.ConnectException: Network is unreachable (connect failed)\' (2 retries remaining)...
Publishing build scan failed due to network error \'java.net.ConnectException: Network is unreachable (connect failed)\' (1 retry remaining)...

A network error occurred.

If you require assistance with this problem, please report it to your Gradle Enterprise administrator and include the following information via copy/paste.

----------
Gradle version: 7.5
Plugin version: 3.10.2
Request URL: https://sitegoeshere.com/scans/publish/gradle/3.10.2/token
Request ID: ****
Exception: java.net.ConnectException: Network is unreachable (connect failed)
----------

Configuration cache entry stored.

    标签: android android-studio gradle


    【解决方案1】:

    [脸掌]

    使用 Gradle Enterprise Build Scans,确保您在正确的公司 Wifi 网络上,而不是访客 Wifi 网络上。 (我的笔记本电脑默认为客人。)

    希望这可以为您节省一个小时的故障排除时间。 :-P

    【讨论】:

      猜你喜欢
      • 2022-08-02
      • 2018-01-09
      • 1970-01-01
      • 2022-09-27
      • 2021-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多