gpt4 book ai didi

flutter - 为什么我收到Gradle任务组装Debug失败错误

转载 作者:行者123 更新时间:2023-12-03 05:24:33 25 4
gpt4 key购买 nike

我从GitHub导入了一个flutter项目。当我尝试运行它时,我遇到了这个错误(代码中没有错误)。我无法弄清楚这个错误是什么原因,所以我从GitHub导入的每个项目都会收到此错误,请帮帮我!

这是错误:

Exception in thread "main" java.util.zip.ZipException: error in opening zip file.
Gradle threw an error while trying to update itself. Retrying the update...
Finished with error: Gradle task assembleDebug failed with exit code 1.

最佳答案

当您从github获得一个项目时,这是一个常见的问题,我用answer解决了一次。

从那里复制粘贴:

Open your Android Studio preferences(Command + ',') and go to Languages and Frameworks -> Dart

Check "Enable Dart support for the project your_project_name"

In "Dart SDK path" click in "…" and navigate to flutter SDK directory. Under that directory you'll find "bin/cache/dart-sdk". This is the dart sdk path you should use.

Click "Apply"

flutter packages get

flutter run

关于flutter - 为什么我收到Gradle任务组装Debug失败错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61972985/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com