集成测试颤振包与许多其他包不兼容
Posted
技术标签:
【中文标题】集成测试颤振包与许多其他包不兼容【英文标题】:Integration test flutter packages incompatible with a lot of other packages 【发布时间】:2021-07-11 12:25:55 【问题描述】:尝试在dev_dependencies中实现flutter集成测试,同时运行pub get,输出集成测试flutter依赖版本与其他插件不兼容。我得到下一个错误:
[-] flutter pub get
Running "flutter pub get" in --...
Because no versions of test_coverage_badge match >0.2.0 <0.3.0 and test_coverage_badge 0.2.0 depends on args ^2.0.0, test_coverage_badge ^0.2.0 requires args ^2.0.0.
And because every version of integration_test from sdk depends on args 1.6.0, test_coverage_badge ^0.2.0 is incompatible with integration_test from sdk.
So, because -- depends on both integration_test any from sdk and test_coverage_badge ^0.2.0, version solving failed.
pub get failed (1; So, because -- depends on both integration_test any from sdk and test_coverage_badge ^0.2.0, version solving failed.)
exit code 1
当我解决这个问题时,还有很多其他问题。 Flutter 集成过时了吗?有没有人可以解决这个问题?
颤振医生 -v 输出:
[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19041.867], locale en-US)
• Flutter version 2.0.4 at C:\Users\davor\flutter
• Framework revision b1395592de (2 weeks ago), 2021-04-01 14:25:01 -0700
• Engine revision 2dce47073a
• Dart version 2.12.2
[√] android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\davor\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:\Users\davor\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.55.2)
• VS Code at C:\Users\davor\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
【问题讨论】:
【参考方案1】:https://dart.dev/null-safety#known-issues 仍在测试相关包不会迁移到 null 安全,预计 2021 年中
【讨论】:
以上是关于集成测试颤振包与许多其他包不兼容的主要内容,如果未能解决你的问题,请参考以下文章
我们如何在 Flutter 中为集成测试生成 json 报告?