Can't load Kernel binary: Invalid kernel binary format version.
Dart snapshot generator failed with exit code 254
Can't load Kernel binary: Invalid kernel binary format version.
Can't load Kernel binary: Invalid kernel binary format version.
Dart snapshot generator failed with exit code 254
Dart snapshot generator failed with exit code 254
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' 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 7s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 9.6s
Gradle task bundleRelease failed with exit code 1
當我嘗試運行 flutter build appbundle --no-sound-null-safety 命令時,會出現此錯誤。它的解決方案是什么?
uj5u.com熱心網友回復:
對我有用的是:洗掉你的 pubspec.lock,然后在你的 pubspec.yaml 中按“Pub Get”,它會再次重新生成 pubspec.lock 檔案并應該解決問題。
uj5u.com熱心網友回復:
嘗試這些命令,然后再試一次:
flutter create .
flutter clean
flutter pub get
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/378969.html
上一篇:在類函式中獲取API
