Flutter:当前的Flutter SDK版本是0.0.0-未知

我没有使用GIT。正如我所看到的一些帖子/问题,用户提到他们正在使用GIT,并且由于这些错误而导致问题。

昨天,我添加了Image Cropper插件,然后重新启动了计算机。重新启动后,它开始显示错误。

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)

我运行Flutter版本命令->下面是输出。

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

我做了Flutter Clean和Flutter Pub,让他们俩都没有解决问题。

我运行Flutter Doctor,这是输出。

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.

我从一开始就没有使用Xcode。

有关如何解决此问题的任何建议。

编辑

我通过运行echo $ PATH检查了路径。

/Users/rahul/Desktop/flutter/bin

路径也在那里。

编辑2 Flutter Upgrade也没有帮助。