首页 > 解决方案 > FLUTTER:无法释放。第 1005 行出错

问题描述

当我尝试制作发布版 APK 或捆绑包时出现此错误。当我运行调试时,一切都很顺利 - 有人有什么想法吗?

的结果run --release --verbose

[   +1 ms] FAILURE: Build failed with an exception.
[   +1 ms] * Where:
[        ] Script
'..\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005[   +1 ms] * What went wrong:
[        ] Execution failed for task ':app:compileFlutterBuildRelease'.
[        ] > Process 'command '..\flutter\bin\flutter.bat'' finishedwith non-zero exit value 1
[   +1 ms] * Try:
[   +1 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug optionto get more log output. Run with --scan to get full insights.
[   +1 ms] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 38s

对于一个全新的项目,我得到了同样的错误,没有编辑

标签: flutter

解决方案


做“flutter build apk --no-shrink”对我有用


推荐阅读