i am getting below problem on installing packages - flutter

any one can help me?
mine project is about news feed i want that output
[Flutter-News-App] flutter pub upgrade
Running "flutter pub get" in Flutter-News-App... Resolving dependencies...
Connection closed before full header was received
pub finished with exit code 69
exit code 69
Because no versions of mockito match >4.1.1 <4.1.1+1 and mockito >=4.1.1+1 <4.1.2 depends on test_api >=0.2.1 <0.4.0, mockito >4.1.1 <4.1.2 requires test_api >=0.2.1 <0.4.0.
And because mockito >=4.1.2 <=5.0.0-nullsafety.7 depends on test_api ^0.2.19-nullsafety, mockito >4.1.1 <=5.0.0-nullsafety.7 requires test_api >=0.2.1 <0.4.0.
And because mockito 4.1.1 depends on test_api ^0.2.1 and every version of flutter_test from sdk depends on test_api 0.4.12, mockito >=4.1.1 <=5.0.0-nullsafety.7 is incompatible with flutter_test from sdk.
So, because flutter_news_app depends on both flutter_test from sdk and mockito ^4.1.1, version solving failed.
pub get failed (1; So, because flutter_news_app depends on both flutter_test from sdk and mockito ^4.1.1, version solving failed.)
exit code 1

I don't know if you are upgrading or just installing, otherwise I think running
flutter pub get will solve your issue

Related

Flutter pub get error ( open_file_safe ^3.2.3 and file_picker ^5.2.2 ) how to fix this?

After running pub get i am getting the following error (First time build)
Because file_picker >=5.0.0 depends on ffi ^2.0.1 and open_file_safe 3.2.3 depends on ffi ^1.0.0, file_picker >=5.0.0 is incompatible with open_file_safe 3.2.3.
And because no versions of open_file_safe match >3.2.3 <4.0.0, file_picker >=5.0.0 is incompatible with open_file_safe ^3.2.3.
So, because app depends on both open_file_safe ^3.2.3 and file_picker ^5.2.2, version solving failed.
pub get failed (1; So, because app depends on both open_file_safe ^3.2.3 and file_picker ^5.2.2, version solving failed.)
I tried to run pub get command and expected it to run successfully without any error.
As a fast solution for now you can use
https://pub.dev/packages/open_filex
if and only if your app is only running on mobile OS

integration_test Depends on Old Version of test_api (0.4.3) - How Can I Upgrade?

I'm trying to keep all my dependencies up to date, but integration_test and flutter_test seem to depend on test_api 0.4.3, and won't accept versions higher than this. I've had this problem for several months. I've watched several Flutter versions roll by. Each time, I think it will be fixed, and the problem remains. I currently have installed
Flutter 2.8.1 • channel stable
The current version of test is 1.20.1 but if I try to use the latest package, I get this error when I do a flutter pub get
Because test >=1.20.0 depends on test_api 0.4.9 and every version of integration_test from sdk depends on test_api 0.4.3, test >=1.20.0 is incompatible with
integration_test from sdk.
So, because assets_app depends on both integration_test from sdk and test ^1.20.1, version solving failed.
I checked out the package on GitHub for integration_test and as you can see, it points to 0.4.9 of test_api. So, the only thing I can think of is that the current Flutter SDK points to an older version of integration_test.
It looks as though test is generally outdated because if I try to upgrade analyzer, I get this:
Because every version of flutter_test from sdk depends on test_api 0.4.3 and test >=1.20.0 depends on test_api 0.4.9, flutter_test from sdk is incompatible with test >=1.20.0.
And because test >=1.17.10 <1.20.0 depends on analyzer >=1.0.0 <3.0.0 and test >=1.16.6 <1.17.10 depends on analyzer ^1.0.0, if flutter_test from sdk and test >=1.16.6 then analyzer >=1.0.0 <3.0.0.
And because test >=1.16.1 <1.16.6 depends on analyzer >=0.39.5 <2.0.0 and test >=1.16.0-nullsafety.10 <1.16.1 depends on analyzer >=0.36.0 <0.42.0, if flutter_test from sdk and test >=1.16.0-nullsafety.10 then analyzer >=0.36.0 <3.0.0.
And because test >=1.16.0-nullsafety <1.16.0-nullsafety.8 requires SDK version >=2.10.0-0 <2.12.0 and test <1.3.0 requires SDK version >=1.8.0 <2.0.0-∞, if flutter_test from sdk and test <1.3.0-∞ or >=1.16.0-nullsafety <1.16.0-nullsafety.8 or >=1.16.0-nullsafety.10 then analyzer >=0.36.0 <3.0.0.
And because test >=1.3.0 <1.16.0-nullsafety depends on yaml ^2.0.0 and test >=1.16.0-nullsafety.8 <1.16.0-nullsafety.12 depends on yaml ^2.0.0, if flutter_test from sdk and test any then analyzer >=0.36.0 <3.0.0 or yaml ^2.0.0.
And because assets_app depends on analyzer ^3.2.0 which depends on yaml ^3.0.0, flutter_test from sdk is incompatible with test.
So, because assets_app depends on both flutter_test from sdk and test any, version solving failed.
How can we upgrade integration_test so that we can also use test_api 0.4.9, and test 1.20.1 ?
Flutter pins it's dependencies. That's it. You have two options.
Wait for the next flutter release that has a version pin that you want
add a dependency override to get the latest version
In my case the problem was with the integration_test package
Accessing the flutter eintegration test package via cli , you can update the dependencies.
pubspec.yaml in integration_test contains this in every package you can update.
archive: 3.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
So I ran "flutter update-packages --force-upgrade"
He updated the conflict and I had no more problems.

pub get failed (1; So, because fstore depends on both flutter_launcher_icons 0.8.1 and cached_network_image 2.5.1, version solving failed.)

[![Because every version of flutter_test from sdk depends on async 2.6.1 and fstore depends on async 2.5.0, flutter_test from sdk is forbidden.
So, because fstore depends on flutter_test any from sdk, version solving failed.
Running "flutter pub get" in testupdate...
pub get failed (1; So, because fstore depends on flutter_test any from sdk, version solving failed.)
]1]1
Code was running on master channel but when I changed channel to dev after that i'm Getting this error on each channel
When I upgrade this Async I get more errors
This is because you are having a flutter package where its dependency needs a higher version than you need. This might be due to your dependencies have updated.
Use
flutter_launcher_icons: ^0.9.0
cached_network_image: ^3.0.0
Now both supports Null safety. Please use updated packages from https://pub.dev/packages

Error on : Because every version of integration_test from sdk depends on vm_service 6.0.1-nullsafety.1 and dwds ^7.1.0 depends on vm_service 5.5.0,

I'm new to flutter and I've been having dependency issues on flutter Keep having this same error
Because every version of integration_test from sdk depends on vm_service 6.0.1-nullsafety.1 and dwds ^7.1.0 depends on vm_service 5.5.0, integration_test from sdk is incompatible with dwds ^7.1.0.
So, because brandapp depends on both dwds ^7.1.0 and integration_test any from sdk, version solving failed.
pub get failed (1; So, because brandapp depends on both dwds ^7.1.0 and integration_test any from sdk, version solving failed.)```

Flutter automation testing dependency issue

I am trying to start with UI automation tests in my flutter app. I am following this particular VIDEO. I was able to establish the part where you write the following snippet into pubspec.yaml
dev_dependencies:
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
I need both flutter_test and flutter driver.
But when I add
test: any
I get this following error after hitting Get Dependencies
The current Dart SDK version is 2.8.4.
Because test <1.3.0 requires SDK version >=1.8.0 <2.0.0-∞ and test
=1.16.0-nullsafety requires SDK version >=2.10.0-0 <2.11.0, test <1.3.0-∞ or >=1.16.0-nullsafety is forbidden.
And because test >=1.3.0 <1.12.0 depends on boolean_selector ^1.0.0,
test <1.12.0-∞ or >=1.16.0-nullsafety requires boolean_selector
^1.0.0.
And because test >=1.9.3 <1.15.4 depends on analyzer >=0.36.0 <0.40.0
and every version of flutter_test from sdk depends on boolean_selector
2.0.0, if flutter_test any from sdk and test <1.15.4-∞ or >=1.16.0-nullsafety then analyzer >=0.36.0 <0.40.0.
And because test >=1.15.4 <1.16.0-nullsafety depends on analyzer
=0.36.0 <0.41.0 and json_serializable 0.5.8+1 depends on analyzer ^0.32.0, one of flutter_test any from sdk or test any or
json_serializable 0.5.8+1 must be false.
Because json_serializable >=0.1.0+1 <=0.5.8 requires SDK version
=1.22.1 <2.0.0-∞ and no versions of json_serializable match >0.5.8+1 <0.6.0, json_serializable >=0.1.0+1 <0.5.8+1 or >0.5.8+1 <0.6.0 is
forbidden.
Thus, one of flutter_test any from sdk or test any or
json_serializable >=0.1.0+1 <0.6.0 must be false.
And because MyApp depends on json_serializable ^0.5.0,
flutter_test from sdk is incompatible with test.
So, because MyApp depends on both flutter_test any from sdk and
test any, version solving failed. pub get failed (1; So, because
MyApp depends on both flutter_test any from sdk and test any,
version solving failed.)
I even tried to put there some specific version like 1.5.4 into the test parameter I get the same error.
PS:
My Flutter version is 1.17.4
My Dart Version 2.8.4
Is there a way how get rid of the error mentioned above? As I said, when I do not use "test" parameter everything works. I guess I will need this parameter later on.