Can't include flutter_blue into my Flutter project - flutter

I was trying to import flutter_blue into my project, generated by flutter create myapp, but I get an error message directly:
Because every version of flutter_test from sdk depends on convert 2.0.1 and flutter_blue 0.4.0 depends on convert ^2.0.2, flutter_test from sdk is incompatible with flutter_blue 0.4.0.
And because no versions of flutter_blue match >0.4.0 <0.5.0, flutter_test from sdk is incompatible with flutter_blue ^0.4.0. ...
pub get failed (1)
I'm using Flutter 0.5.1 (preview release 1).
Are there any workarounds to get it somehow running or any alternative libraries to use Bluetooth?

WorkAround:
Instead of going with 0.4.0. Can you with previous release 0.3.3 which is not having this problem.
flutter_blue: ^0.3.3
Reason:
flutter_blue updated their dependency here which is not yet updated in flutter_test(which is using 2.0.1 of convert). So we have to downgrade flutter_blue to use with flutter/flutter_test

Related

Can't pub-get from pubspec.yaml file in Flutter app

Every time I want to install a package it gives this error, how do I fix it? The error output is below:
The current Dart SDK version is 2.12.3.
The current Flutter SDK version is 0.0.0-unknown.
Because image_picker >=0.3.0 requires Flutter SDK version >=0.1.4 and image_picker <0.3.0 requires SDK version >=1.8.0 <2.0.0, image_picker is forbidden.
So, because firebase depends on image_picker any, version solving failed.
Running "flutter pub get" in firebase...
pub get failed (1; So, because firebase depends on image_picker any, version solving failed.)
You check your flutter version and check that dependency version and change the dependency version otherwise remove the version.
You have to either:
Downgrade the version of image_picker to match the flutter SDK version you currently use, or
Upgrade your flutter SDK version to a version above or equal to 1.8.0. (preferred solution).

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.

How to run Flutter legacy library?

Flutter_Blue 0.8.0 Its library is not compatible with the version of Flutter I am using.
https://pub.dev/packages/flutter_blue/versions/0.7.3 How do I install this ? Pub dont work. Or why the Flutter_Blue package is not working for me. flutter_bluetooth_serial okey
If you want to use a lower version of the package, you can lower the SDK version.
Flutter 1.x version https://docs.flutter.dev/development/tools/sdk/releases

flutter HERE Maps SDK - dependency on ffi: 1.0.0 - conflicting with another plugin

running into the following issue where Here SDK is conflicting with another plugin (file_picker)...
Because every version of here_sdk from path depends on ffi 1.0.0 and file_picker >=4.0.0 depends on ffi ^1.1.2, here_sdk from path is incompatible with file_picker >=4.0.0.
So, because AppName depends on both file_picker 4.1.3 and here_sdk from path, version solving failed.
pub get failed (1; So, because AppName depends on both file_picker 4.1.3 and here_sdk from path, version solving failed.)
The issue is the "ffi: 1.0.0" in Here's pubspec.yaml which locks in version 1.0. For reference, I am using 4.8.3 of the SDK. Is there any reason why Here doesn't use the carat ^ notation so that pub can use the latest 1.x version and not the hardcoded 1.0.0 version? I can go in and change the pubspec.yaml version myself for Here SDK, but i don't want to introduce any incompatibility. Technically this should be ok because of semantic-versions, but of course i don't want to make any assumptions.
thoughts? thanks!
We are evaluating upgrading ffi version but there is no certain timeline on this by when this will be available. It is possible to change the ffi version in the pubspec.yml but as explained above that it is risky.

Flutter issue - Flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7

I got this issue using flutter packages get:
Because every version of flutter_driver from sdk depends on file 5.0.6 and flutter_gallery depends on file 5.0.7, flutter_driver from sdk is forbidden.
So, because flutter_gallery depends on flutter_driver any from sdk, version solving failed.
pub upgrade failed (1)
I don't know what I am supposed to do here, I was trying to compile this flutter example: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery
This may be because flutter dependencies are locked to fixed versions.
You can check this in the pubspec.yaml for flutter_driver which is in
\flutter\packages\flutter_driver
and compare it to the latest version at GitHub
If so, flutter upgrade won't necessarily update the dependencies versions. Doing a forced update of the packages may resolve your problem.
flutter update-packages --force-upgrade