【问题标题】:Why do I get "Gradle task assembleDebug failed with exit code 1"?为什么我会收到“Gradle task assembleDebug failed with exit code 1”?
【发布时间】:2021-06-29 19:10:31
【问题描述】:

我使用 flutter create app01 创建了我的第一个 Flutter 项目,当我尝试在我的物理设备上运行它时,我收到了这个错误:

[+14236 ms] Starting a Gradle Daemon (subsequent builds will be faster)
[+1928375 ms] FAILURE: Build failed with an exception.
[  +19 ms] * What went wrong:
[   +4 ms] A problem occurred configuring root project 'android'.
[   +2 ms] > Could not resolve all artifacts for configuration ':classpath'.
[   +4 ms]    > Could not download kotlin-compiler-embeddable-1.3.50.jar
(org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
[   +3 ms]       > Could not get resource
'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.ja
r'.
[   +2 ms]          > Premature end of Content-Length delimited message body (expected: 36,615,572; received:
19,922,800)

我做错了什么?

【问题讨论】:

    标签: android flutter dart gradle


    【解决方案1】:

    首先关闭 IDE 或编码应用程序,然后转到 cmd 运行 flutter doctor,如果它显示 enter image description here

    然后输入 flutter doctor --android-licenses

    按 y 表示是或更多,继续它要求您执行的步骤

    【讨论】:

    • 我做了,但是所有类别都是绿色的,尤其是“Android 工具链”,它说“没有发现问题!”。
    猜你喜欢
    • 2021-09-04
    • 1970-01-01
    • 2020-11-06
    • 1970-01-01
    • 2020-06-22
    • 2021-04-06
    • 1970-01-01
    • 2021-12-30
    • 1970-01-01
    相关资源
    最近更新 更多