0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

flutterテストライブラリのバージョンによる依存

Posted at

単体テストに必要なtestパッケージ、ウィジェットテストに必要なflutter_testでtest_apiというパッケージへの依存があり、それぞれ依存しているtest_apiのバージョンが競合しpub getが失敗するという状況になった。

うまく行ったのはflutter自体がv1.10.14のときに、次のように指定した場合。 test_apiのバージョンは0.2.5のようです。

dev_dependencies:
  test: 1.6.3
  flutter_test:
    sdk: flutter

失敗時のエラーメッセージは次の二種類でした。

Because every version of flutter_test from sdk depends on test_api 0.2.5 and test >=1.9.2 depends on test_api 0.2.9, flutter_test from sdk is incompatible with test >=1.9.2.

So, because couple_todo depends on both test 1.9.2 and flutter_test any from sdk, version solving failed.
Because every version of flutter_test from sdk depends on test_api 0.2.5 and test >=1.6.0 <1.6.1 depends on test_api 0.2.3, flutter_test from sdk is incompatible with test >=1.6.0 <1.6.1.
So, because couple_todo depends on both test 1.6.0 and flutter_test any from sdk, version solving failed.
pub get failed (1)
Process finished with exit code 1
0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?