目前Flutter SDK的版本为0.0.0-未知。

问题描述 投票:0回答:1

我没有使用GIT。因为我看到一些帖子的问题,用户提到他们使用GIT,由于他们得到的错误。

昨天,我添加了图像裁剪插件,然后我重新启动了机器。重启后,它开始给出错误。

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 Get他们都没有解决这个问题。

我运行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
1个回答
-1
投票

转到 github页面 flutter_image_cropper包,在你的空间里把它打叉,然后在它的pubspec.yaml文件里修改它的sdk需求,提交,推送,现在在你的项目里,导入这个包的时候,提供你的github链接到你的打叉仓库的路径,以.git结尾。这样就可以完美的工作了。

你也可以参考 Github页面 对于常见问题

© www.soinside.com 2019 - 2024. All rights reserved.