all error info :
[ERROR:flutter/shell/common/shell.cc(117)] Dart Error: Can't load Kernel binary: Invalid SDK hash.
[ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
[ERROR:flutter/runtime/runtime_controller.cc(462)] Could not create root isolate.
[ERROR:flutter/shell/common/shell.cc(669)] Could not launch engine with configuration.
flutter doctor info
• Flutter version 3.19.6 on channel stable at /home/bluearc/local/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (2 weeks ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /usr/bin/google-chrome-stable
[✓] Linux toolchain - develop for Linux desktop
• clang version 17.0.6
• cmake version 3.29.2
• ninja version 1.11.1
• pkg-config version 2.1.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Arch Linux 6.6.8-arch1-1
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.111
[✓] Network resources
• All expected network resources are available.
First, I mistakenly deleted my Flutter SDK folder. Then, I reinstalled it with the new version SDK from flutter.dev but forgot to remove the config files and cache before reinstalling. Now, every Flutter project (including examples) builds for Linux will encounter this error, but web builds are fine. After that, I deleted the SDK and removed all config and cache files to reinstall, but it didn’t run.
I changed my Flutter channel to main
, but it didn’t solve the issue.
I also tried to reinstall the Flutter SDK using pacman, but encountered another error:
Unexpected Kernel Format Version 117 (expected 114)
#0 BinaryBuilder.readComponent.<anonymous closure> (package:kernel/binary/ast_from_binary.dart:692)
#1 Timeline.timeSync (dart:developer/timeline.dart:173)
#2 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:679)
#3 _InitializationFromSdkSummary._prepareSummary (package:front_end/src/fasta/incremental_compiler.dart:2503)
#4 _InitializationFromUri.initialize (package:front_end/src/fasta/incremental_compiler.dart:2577)
<asynchronous suspension>
#5 IncrementalCompiler._ensurePlatformAndInitialize (package:front_end/src/fasta/incremental_compiler.dart:1383)
<asynchronous suspension>
#6 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:270)
<asynchronous suspension>
#7 CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:139)
<asynchronous suspension>
#8 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:77)
<asynchronous suspension>
#9 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:610)
<asynchronous suspension>
#10 listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1303)
<asynchronous suspension>
the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.
Methods from comments on this :https://aur.archlinux.org/packages/flutter-tool, couldn’t solve the issue.
I’ll soon reach my deadline. Thank you very much for your help.
KOJIMASAN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.