【问题标题】:FAILURE: Build failed with an exception. Could not resolve all files for configurationFAILURE:构建失败并出现异常。无法解析所有文件以进行配置
【发布时间】:2021-12-25 22:16:53
【问题描述】:

我在安装一些依赖项时遇到问题:

dependencies:
  youtube_player_iframe: ^2.2.2

当我运行颤振并抛出一些错误时:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_local_notifications:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':flutter_local_notifications:debugCompileClasspath'.
   > Could not download threetenbp-1.4.2-no-tzdb.jar (org.threeten:threetenbp:1.4.2)
      > Could not get resource 'https://repo.maven.apache.org/maven2/org/threeten/threetenbp/1.4.2/threetenbp-1.4.2-no-tzdb.jar'.
         > Could not GET 'https://repo.maven.apache.org/maven2/org/threeten/threetenbp/1.4.2/threetenbp-1.4.2-no-tzdb.jar'.
            > This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (repo.maven.apache.org)

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

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

BUILD FAILED in 20s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

有没有办法解决这个问题?

【问题讨论】:

  • 正如这里提到的 ** 没有收到来自权威服务器 (repo.maven.apache.org) 的响应** 也许你忘记将 maven 依赖添加到你的 gradle 文件或者网络连接丢失请将您的 gradle 文件内容添加到帖子中与您一起解决!

标签: flutter apache gradle dependencies flutter-dependencies


【解决方案1】:

关闭防火墙即可:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-28
    • 2018-10-22
    • 1970-01-01
    • 2018-10-29
    • 2020-06-13
    • 2021-09-24
    • 2016-05-18
    相关资源
    最近更新 更多