【问题标题】:I got Could not find com.android.tools.build:gradle:4.1.0 error in every flutter project我在每个颤振项目中都找不到 com.android.tools.build:gradle:4.1.0 错误
【发布时间】:2021-12-01 16:52:46
【问题描述】:

几天前,我尝试将我的颤振项目与 firebase 连接并使用它的 sdk。我确实很喜欢文档,但是自从我收到这些错误之后:

Launching lib/main.dart on STK L21 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:4.1.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom
     Required by:
         project :
* 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 19s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

即使我创建新的颤振项目并运行它,我也会收到这些错误。我也不能使用./gradlew clean build。我已经尝试了互联网上所有可能的解决方案,但我无法修复它。 我快疯了,请帮帮我。

【问题讨论】:

    标签: java android flutter gradle


    【解决方案1】:

    当我使用 VPN 或 VPS 时,我有几次和所有时间都遇到过这个问题 .. 问题解决了。我建议您使用 VPN 并再次运行该项目

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-30
      • 2021-07-04
      • 2021-09-24
      • 2021-06-21
      • 2022-10-07
      • 2017-08-21
      • 1970-01-01
      • 2020-05-19
      相关资源
      最近更新 更多