I facing issue that show up to me that message when Trying to get packages
Running "flutter pub get" in stok_app_a...
Because no versions of in_app_purchase match >0.2.2+4 <0.3.0 and in_app_purchase 0.2.2+4 depends on json_annotation ^2.0.0, in_app_purchase ^0.2.2+4 requires json_annotation ^2.0.0.
And because every version of speech_to_text depends on json_annotation
^3.0.0, in_app_purchase ^0.2.2+4 is incompatible with speech_to_text.
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed. pub get failed (1;
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed.) exit code 1
I solved this issue by assignment dependency_overrides in pubspec.yaml file like that
dependency_overrides:
json_annotation: ^2.0.0
to override the json_annotation 2.0.0
Related
Because firebase_ui_auth >=1.0.3 depends on firebase_core ^2.1.1 and cloud_firestore >=3.1.2 <4.0.1 depends on firebase_core ^1.10.2, firebase_ui_auth >=1.0.3 is incompatible with cloud_firestore >=3.1.2 <4.0.1.
So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.
pub get failed (1; So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.)
exit code 1
How can I fix this?
Try
firebase_ui_auth: ^1.0.0-dev.0 # or ^1.0.3
firebase_core: ^1.24.0
cloud_firestore: ^3.4.9
I am using retrofit_generator and floor_generator in my application.
retrofit_generator: ^4.0.1
floor_generator: ^1.2.0
When I am trying to run flutter packages pub run build_runner build getting this error:
Because no versions of retrofit_generator match >4.0.1 <5.0.0 and retrofit_generator 4.0.1 depends on analyzer ^3.0.0, re
trofit_generator ^4.0.1 requires analyzer ^3.0.0.
And because floor_generator >=1.2.0 depends on analyzer ^2.2.0, retrofit_generator ^4.0.1 is incompatible with floor_gene
rator >=1.2.0.
So, because my_flutter_app depends on both floor_generator ^1.2.0 and retrofit_generator ^4.0.1, version solving failed.
Running "flutter pub get" in my_flutter_app...
pub get failed (1; So, because my_flutter_app depends on both floor_generator ^1.2.0 and retrofit_generator ^4.0.1,
version solving failed.)
Also, tried to add analyzer: ^3.0.0 in dev_dependencies then:
Because floor_generator >=1.2.0 depends on analyzer ^2.2.0 and my_flutter_app depends on analyzer ^3.0.0, floor_generator >=1.2.0 is forbidden.
So, because my_flutter_app depends on floor_generator ^1.2.0, version solving failed.
pub get failed (1; So, because my_flutter_app depends on floor_generator ^1.2.0, version solving failed.)
exit code 1
How can we use both without errors?
Checking the retrofit_generator CHANGELOG, you will see there was a breaking change on version 4.0.0 making the library depend on version 3.0.0 but floor_generator hasn't been updated for the last 7 months and it depends on older version of analyzer.
Possible solution would be to downgrade retrofit_generator in a version prior to the breaking change, or wait till the publisher of floor_generator updates its dependencies.
They said on there github on issue:
It looks like the current master already supports analyzer <5.0.0 but
it's not on pub.dev yet because of a failed test because the pub
command can't be found.
check this link the issue
so thanks for this at least now we can use the git url until you publish it on pub.dev .
use:
retrofit_generator:
git:
url: https://github.com/trevorwang/retrofit.dart.git/
ref: master
path: generator
instead of
retrofit_generator: ^4.0.1
[![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
I have an error when i try to add a new plugin in my pubspec.yaml
i add the plugin : easy_localization: ^3.0.0
And i have this error message :
Because flutter_launcher_icons >=0.7.0 <0.9.0 depends on args ^1.5.0 and easy_localization >=3.0.0-nullsafety depends on args ^2.0.0, flutter_launcher_icons >=0.7.0 <0.9.0 is incompatible with easy_localization >=3.0.0-nullsafety.
So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.
pub get failed (1; So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.)
Could you try adding,
flutter_launcher_icons: ^0.9.0
args: ^2.0.0
easy_localization: ^3.0.0-nullsafety
to your pubspec.yaml and try saving it again to reload the packages?
The problem is: The library version you want to use is newer than Flutter, and there are two solutions
1: Go to the library website and click on the version and install an old library, for example (easy_localization: ^ 2.3.3)
2: Install the latest version of Flutter. Flutter2
I am trying to run a flutter theme code in visual studio code and facing this issue after running command (flutter run)
Because every version of flutter_test from sdk depends on vector_math 2.1.0-nullsafety.5 and fstore depends on vector_math 2.0.8, flutter_test from sdk is forbidden.
So, because fstore depends on flutter_test any from sdk, version solving failed.
Running "flutter pub get" in ecomputex...
pub get failed (1; So, because fstore depends on flutter_test any from sdk, version solving failed.)
Please helpenter image description here
just add this line of code in your pubspec
dependency_overrides:
vector_math: 2.1.0-nullsafety.5
this will override the dependency, and you can use whatever version you want. you might need to change it the version of the package.
my code example:
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
file_picker: ^3.0.0
hive: ^2.0.0
hive_flutter: ^1.0.0
dependency_overrides:
path_provider: 2.0.1