Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The current Flutter SDK version is 0.0.0-unknown

Tags:

flutter

I am not using GIT. As i have seen some posts/questions where users are mentioning they are using GIT and due to that they are getting the error.

Yesterday, I added Image Cropper Plugin and then I restarted the machine. After the restart, it starts giving the error.

The current Flutter SDK version is 0.0.0-unknown.

Because image_cropper 1.2.1 requires Flutter SDK version ^1.12.13 and no versions of image_cropper match >1.2.1 <2.0.0, image_cropper ^1.2.1 is forbidden.
So, because demoapp depends on image_cropper ^1.2.1, version solving failed.
pub get failed (1; So, because demoapp depends on image_cropper ^1.2.1, version solving failed.)
Exited (1)

I run Flutter version command -> Below is the output.

Flutter 1.12.13+hotfix.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f139b11009 (6 weeks ago) • 2020-03-30 13:57:30 -0700
Engine • revision af51afceb8
Tools • Dart 2.7.2

I did Flutter Clean and Flutter Pub Get they both didn't fix the issue.

I run Flutter Doctor and here is the output.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-IN)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the
        Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.44.2)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

I am not using Xcode from the beginning.

Any advice on how to fix this issue.

Edit

I checked the path by running echo $PATH.

/Users/rahul/Desktop/flutter/bin

Path is also there.

Edit 2 Flutter Upgrade also didn't helped.

like image 378
Roxx Avatar asked Dec 31 '25 11:12

Roxx


1 Answers

Flutter SDK files

  1. First Restart your system.
  2. Open your downloaded Flutter SDK zip folder (folder you get when you download flutter sdk from official website) and copy packed-refs and config file which is under <flutter_windows_1.22.5-stable.zip\flutter.git> folder
  3. Remove these two files from the existing flutter sdk location in your system(which you extracted earlier) and paste these files again.
  4. Again open android studio and try again by clicking Get dependencies button.
  5. Click on run application.
  6. App will run successfully.
like image 200
Nikhil Soni Avatar answered Jan 02 '26 11:01

Nikhil Soni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!