Flutter upgrade error - Can't load Kernel binary: Invalid kernel binary format version.

1,522 views
Skip to first unread message

Wesley Aoyama

unread,
Oct 20, 2021, 7:37:23 AM10/20/21
to Flutter Development (flutter-dev)
Hello,

I'm trying to upgrade flutter version 2.2.3 to 2.5.3, but when I run flutter upgrade, the following error appears:

 d:\src\flutter> flutter upgrade --force
Upgrading Flutter to 2.5.3 from 2.2.3 in D:\correios\ambiente\flutter...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine d3ea636dc5d16b56819f3266241e1f708979c233...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Can't load Kernel binary: Invalid kernel binary format version.

It's not a network problem, because it downloads the dart-sdk zip file, extracts it, and when it does pub upgrade, it craches.

I'm stuck on this for more than 3 days. I've already tryied to delete the bin/cache folder, run flutter doctor, but then other error appears.

 d:\src\flutter> flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Error: Error when reading '/bin/cache/flutter_tools.snapshot': O sistema não pode encontrar o arquivo especificado.
 
When I just install flutter and runs flutter doctor, it complains of Visual Studio, but I don't think it's a problem, because I only use android studio and develop mobile apps.

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [versão 10.0.19041.208], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2017 15.9.40)
    X Visual Studio 2019 or later is required.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio
[√] VS Code (version 1.59.1)
[√] Proxy Configuration
[√] Connected device (3 available)

! Doctor found issues in 1 category.


Can anyone help me, please? 

Thanks,

Wesley Aoyama




Reply all
Reply to author
Forward
0 new messages