首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >颤振:“无法解析配置的所有工件‘:类路径’”

颤振:“无法解析配置的所有工件‘:类路径’”
EN

Stack Overflow用户
提问于 2020-05-29 09:33:09
回答 1查看 3.3K关注 0票数 4

我试图运行一个默认的颤振应用程序,但是当我运行它时会出现以下错误:

代码语言:javascript
代码运行次数:0
运行
复制
Running Gradle task 'assembleDebug'...

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 resolve com.android.tools.build:gradle:3.5.3.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.5.3.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
               > Connect to 172.30.0.15:3128 [/172.30.0.15] failed: Connection timed out: connect
      > Could not resolve com.android.tools.build:gradle:3.5.3.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
               > Connect to 172.30.0.15:3128 [/172.30.0.15] failed: Connection timed out: connect
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
     Required by:
         project :
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
               > Connect to 172.30.0.15:3128 [/172.30.0.15] failed: Connection timed out: connect
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
         > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
            > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
               > Connect to 172.30.0.15:3128 [/172.30.0.15] failed: Connection timed out: connect

* 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 2m 25s
Exception: Gradle task assembleDebug failed with exit code 1

下面是build.gradle代码:

代码语言:javascript
代码运行次数:0
运行
复制
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

这个应用程序的全部代码都是默认的,没有做任何更改--我刚刚连接了一个模拟器,并试图在这个assembleDebug错误的情况下运行它。如果有人知道我哪里出了问题,请评论.

EN

回答 1

Stack Overflow用户

发布于 2022-01-19 00:31:35

颤振中重要的CLI命令之一是flutter doctor。此命令将检查颤振信息的当前状态。如果某些软件丢失或不工作,它将显示一个警告。

检查文档中的一个示例(这是Windows操作系统设置)。

还请参阅macOS安装程序、LinuxChrome操作系统

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62082849

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档