Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter error - Invalid kernel binary format version (found 4, expected 6)

When running my application after a upgrading flutter i am getting this error.

error: Invalid kernel binary format version (found 4, expected 6)

I am currently on master, I tried switch the branch tobeta`. Still no help. Here is the stack trace.

2018-05-28 15:22:46.214821+0530 Runner[579:57143] ../../third_party/dart/runtime/vm/kernel_binary.cc: 39: error: Invalid kernel binary format version (found 4, expected 6)
2018-05-28 15:22:46.214912+0530 Runner[579:57143] Dumping native stack trace for thread 7c03
2018-05-28 15:22:46.237923+0530 Runner[579:57143]   [0x0000000100fda4a0] dart::Profiler::DumpStackTrace(void*)
2018-05-28 15:22:46.239415+0530 Runner[579:57143]   [0x0000000100fda4a0] dart::Profiler::DumpStackTrace(void*)
2018-05-28 15:22:46.271484+0530 Runner[579:57143]   [0x0000000000000000] Unknown symbol
2018-05-28 15:22:46.273617+0530 Runner[579:57143]   [0x0000000100eda158] dart::kernel::Program::ReadFromBuffer(unsigned char const*, long, bool)
2018-05-28 15:22:46.273681+0530 Runner[579:57143] -- End of DumpStackTrace

Here's the output of flutter doctor.

Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, v0.4.5-pre.98, on Mac OS X 10.13.3 17D47, locale en-IN) [✗] 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.io/setup/#android-setup for detailed instructions).
      If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. [✓] iOS toolchain - develop for iOS devices (Xcode 9.2) [✗] Android Studio (not installed) [✓] IntelliJ IDEA Community Edition (version 2017.3.5) [✓] Connected devices (3 available)

! Doctor found issues in 2 categories.

What could be wrong? Please help.

like image 333
Chaythanya Nair Avatar asked May 28 '18 09:05

Chaythanya Nair


2 Answers

Fix: deleting the bin/cache directory in your Flutter installation directory, then run flutter doctor and try again. Usually, it will be C:\src\flutter.

Upgrade flutter if required.

like image 177
Muhammad Salman Avatar answered Nov 15 '22 05:11

Muhammad Salman


Try flutter clean - it seems you have some stale artifacts in build/ folder.

like image 35
Vyacheslav Egorov Avatar answered Nov 15 '22 06:11

Vyacheslav Egorov