WiFiMing 2023-10-05 12:43 采纳率: 33.3%
浏览 16

新建的flutter,运行项目就报错


Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on V2166BA in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:7.3.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:7.3.0.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
      > Could not resolve com.android.tools.build:gradle:7.3.0.
         > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
     Required by:
         project :
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information

* 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 17s
Retrying Gradle Build: #1, wait time: 100ms
[!] Gradle threw an error while downloading artifacts from the network.
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:7.3.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:7.3.0.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
      > Could not resolve com.android.tools.build:gradle:7.3.0.
         > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
     Required by:
         project :
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
               > Connect to 127.0.0.1:9910 [/127.0.0.1] failed: Connection refused: no further information

* 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 8s
[!] Gradle threw an error while downloading artifacts from the network.
Exception: Gradle task assembleDebug failed with exit code 1

  • 写回答

2条回答 默认 最新

  • crazyhilary 2023-12-13 17:08
    关注

    配置代理什么的吧,拉取插件时,访问了本地服务:Connect to 127.0.0.1:9910

    评论

报告相同问题?

问题事件

  • 创建了问题 10月5日

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用