"Failed to initialize Flutter: Process exited with code 1" after upgrade to Flutter 1.22

See original GitHub issue

Steps to Reproduce

  1. Upgrade to Flutter 1.22 on Stable channel
  2. Flutter doctor
  3. Open any project in VS Code (1.49.2)
  4. Error: “Failed to initialize Flutter: Process exited with code 1.”

Restarting, flutter clean, uninstall re-install Flutter Extension, all have no effect. Thanks very much for all the hard work!

Logs

flutter doctor --verbose
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-CN)
    • Flutter version 1.22.0 at /Users/Orca/flutter/flutter/flutter
    • Framework revision d408d302e2 (2 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/Orca/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.49.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.15.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
fpalacinocommented, Dec 5, 2021

thanks @DanTup !! that has solved the problem!

1reaction
DanTupcommented, Mar 9, 2021

@tony123S it looks like the engine.version file in your SDK contains Git conflict markers (this could happen if something tried to merge two Git branches together - though I’m not sure how that would occur).

The easiest way to fix this would be to re-extract the SDK if you got it from a zip. Running git reset --hard 2.0.1 from the terminal inside your Flutter SDK folder would probably also work (note: this will discard any local modifications in your Flutter SDK, though unless you’re contributing to the Flutter SDK I would not expect you to have any).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to initialize Flutter: Process exited with code 126
After installing Flutter from the extensions market in VScode, a message pops up at the bottom: "Failed to initialize Flutter: Process ...
Read more >
failed to initialize flutter: process exited with code 1. - You.com
The problem is in your external script 'runtex', not in your Python code. It is returning status 127; a nonzero status usually indicates...
Read more >
Upgrading - Flutter documentation
How to upgrade Flutter. ... To update the Flutter SDK use the flutter upgrade command: ... To view your current channel, use the...
Read more >
Error running flutter project after flutter 2.2.1 upgrade-Flutter
[Solved]-Error running flutter project after flutter 2.2.1 upgrade-Flutter. Search. score:2. delete this /D:/flutter/.pub-cache/ directory and the run ...
Read more >
Android Studio Dolphin | 2021.3.1
Updated Wear OS emulator pairing assistant · See Wear devices in the Device Manager. · Pair multiple Wear devices with a single virtual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found