我正试图从Android工作室为颤振应用程序制作一个Android版本,但却没有出错。我如何解决这个问题?
当前颤振版本: 2.10.2
Building with sound null safety
../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 3298: error: unreachable code
Dart snapshot generator failed with exit code -6
../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 3298: error: unreachable code
Dart snapshot generator failed with exit code -6
../../third_party/dart/runtime/vm/compiler/aot/precompiler.cc: 3298: error: unreachable code
Dart snapshot generator failed with exit code -6
FAILURE: Build failed with an exception.
* Where:
Script '/Users/admin/Desktop/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/admin/Desktop/flutter/bin/flutter'' finished with non-zero exit value 1
* 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 39s
Running Gradle task 'assembleRelease'... 40.0s
Gradle task assembleRelease failed with exit code 1发布于 2022-04-29 04:46:36
好像是vm的问题。有一些函数是用main.dart文件编写的,其中一些函数占用了大量内存。所以我找到了解决办法
@语用(‘vm:从不内联’)
以上的功能是占用记忆。
我发现这些函数有运行的命令,flutter,build -详细的
https://stackoverflow.com/questions/71953861
复制相似问题