Can't load Kernel binary: Invalid kernel binary format version. No active package webdev
Asked Answered
S

10

29

After running webdev serve it gives "Can't load Kernel binary: Invalid kernel binary format version. No active package webdev." this error

tried this and it added some dependencies

flutter packages pub global activate webdev
Sentry answered 9/5, 2019 at 2:44 Comment(0)
R
51

Delete the bin/cache directory in your Flutter installation directory, then run flutter doctor.

Reneareneau answered 17/1, 2021 at 2:19 Comment(0)
C
14

Open Flutter SDK folder, go to bin/cache and delete all the files + folders then run flutter doctor, and then flutter upgrade.

Carmon answered 21/12, 2020 at 14:42 Comment(0)
A
8

instead of webdev serve try to use flutter packages pub global run webdev serve and for getting and upgrading packages you can use flutter packages get and flutter packages upgrade respectively.

Ayacucho answered 9/5, 2019 at 11:3 Comment(1)
Can I know the reason why such error appears and how does it not come when using the global command?Papke
Z
2

I would add that deleting the bin/caches folder seems to be the solution when your xcode build freezes on the launch screen. It seems to be related to upgrading Flutter and/or rolling back afterwards (my case).

Zircon answered 1/11, 2021 at 10:18 Comment(1)
also https://mcmap.net/q/150646/-error-39-flutter-flutter-h-39-file-not-found-when-flutter-run-on-ios this helped me to fix a error after deleting the bin/caches.Nerin
B
2

Run the following commands in the terminal inside the project directory

  1. flutter clean
  2. flutter pub get
Buie answered 18/7, 2022 at 10:16 Comment(0)
M
1

I had the same error in Xcode. pod update solves the problem.

Mcelrath answered 20/5, 2021 at 9:17 Comment(0)
A
1

I run flutter clean within the same terminal of my flutter project and that seems to work out

Antakiya answered 5/5, 2022 at 4:15 Comment(0)
C
1

For me, downgrading from 3.0.0 to 2.10.5 required pretty much all the solutions in this thread, and it worked.

Steps I followed,

  1. rm -rf <path to flutter repo>/bin/cache
  2. flutter doctor -v
  3. flutter clean
  4. flutter pub get
  5. flutter pub cache repair
  6. cd in ios directory in the project and pod install

Steps 5 & 6 were probably wasn't necessary but I did it anyway. Step 6 is executed at flutter run anyway.

Carduaceous answered 16/5, 2022 at 14:40 Comment(0)
H
0

For me it was necessary to delete "flutter/bin/cache/flutter_tools.stamp". https://github.com/flutter/flutter/issues/67222

Hammons answered 20/7, 2022 at 13:20 Comment(0)
W
0

What worked for me was:

Switch to the master channel using the command flutter channel master. and then upgrade to the latest flutter version using the command flutter upgrade.

Wirephoto answered 17/5 at 7:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.