gpt4 book ai didi

sdk - flutter 包失败取决于来自 sdk 的 flutter_test any,它需要 SDK 版本 <2.0.0,版本解决失败

转载 作者:IT老高 更新时间:2023-10-28 12:46:10 27 4
gpt4 key购买 nike

我创建了一个flutter项目,运行flutter packages get,输出如下:【二】flutter包搞定等待另一个 flutter 命令释放启动锁...第二次运行“flutter packages get”...当前的 Dart SDK 版本是 2.0.0-dev.63.0.flutter-4c9689c1d2

Because second depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed.
pub get failed (1)
exit code 1

flutter 医生-v

PS D:\dartstudy\second> flutter doctor -v
[√] Flutter (Channel dev, v0.5.7, on Microsoft Windows [Version 6.1.7601], locale zh-CN)
• Flutter version 0.5.7 at E:\flutter
• Framework revision 66091f9696 (2 weeks ago), 2018-07-09 12:52:41 -0700
• Engine revision 6fe748490d
• Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[√] Android toolchain - develop for Android devices (Android SDK 28.0.1)
• Android SDK at f:\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.1
• ANDROID_HOME = f:\Android\Sdk
• Java binary at: E:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.

[√] Android Studio (version 3.1)
• Android Studio at E:\Program Files\Android\Android Studio
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code, 64-bit edition (version 1.25.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 2.16.0

[!] Connected devices
! No devices available

! Doctor found issues in 1 category.

我用来创建项目的 IDE 是 VS 代码。我换了一些flutter sdk的版本,问题和上面一样,这个问题怎么解决?

最佳答案

我遇到了类似的问题:

Running "flutter packages get" in austin-feeds-me-flutter...
The current Dart SDK version is 2.0.0-dev.58.0.flutter-f981f09760.

Because austin_feeds_me depends on palette_generator any which requires SDK version >=2.0.0-dev.61.0 <3.0.0, version solving failed.
pub get failed (1)
Process finished with exit code 1

我用以下命令修复了它:

flutter channel dev
flutter upgrade

修复来源:https://github.com/flutter/flutter/issues/19382

关于sdk - flutter 包失败取决于来自 sdk 的 flutter_test any,它需要 SDK 版本 <2.0.0,版本解决失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51474647/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com