运行“flutter build apk”时出现问题

问题描述 投票:0回答:1

运行“flutter build apk”时返回

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Failed to find Build Tools revision 30.0.3

* 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 23s
Running Gradle task 'assembleRelease'...                           24.8s
Gradle task assembleRelease failed with exit code 1

在build.gradle文件中存在这个问题:

Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.5-all.zip'.
Could not dispatch a message to the daemon.
Could not write '/127.0.0.1:60091'.
Connection reset by peer

扑医生一切都好, java版本是“java 18.0.2.1”

flutter apk
1个回答
0
投票

您面临的问题似乎与 Flutter 无法找到构建工具修订版 30.0.3 有关。您可以尝试通过确保您的 Android SDK 中安装了指定的构建工具版本来解决此问题。您可以打开Android SDK Manager并检查是否安装了30.0.3版本的Build Tools。如果没有,您可以从那里安装它。此外,您可以尝试使用 --stacktrace 选项运行命令来获取有关错误的更多详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.