Here is my Error
Pub get givig this error
Running "flutter pub get" in flutter_application...
Because google_map_location_picker >=3.3.1 <4.1.3 depends on intl >=0.16.0 <=0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0, google_map_location_picker >=3.3.1 <4.1.3 is incompatible with flutter_localizations from sdk.
So, because markets depends on both flutter_localizations any from sdk and google_map_location_picker 4.0.0, version solving failed.
pub get failed (1; So, because markets depends on both flutter_localizations any from sdk and google_map_location_picker 4.0.0, version solving failed.)
Process finished with exit code 1
You can override the dependency using dependency_overrides in your pubspec.yaml
Example
dependency_overrides:
intl: ^0.16.0
dependencies:
flutter:
sdk: flutter
//your other dependance
Related
Because tflite_flutter >=0.6.0 depends on ffi ^1.0.0 and file_picker 5.2.1 depends on ffi ^2.0.1, tflite_flutter >=0.6.0 is incompatible with file_picker 5.2.1.
And because no versions of file_picker match >5.2.1 <6.0.0, tflite_flutter >=0.6.0 is incompatible with file_picker ^5.2.1.
So, because untitled6 depends on both file_picker ^5.2.1 and tflite_flutter ^0.9.0, version solving failed.
pub get failed (1; So, because untitled6 depends on both file_picker ^5.2.1 and tflite_flutter ^0.9.0, version solvingĀ failed.)
I try to get the pubspec.yaml of tflite_flutter (https://pub.dev/packages/tflite_flutter) and it seems to be conflicting with file_picker (https://pub.dev/packages/file_picker), is there any way to change the ffi version in the local pubspec.yaml instead of making pull request on tflite_flutter?
Try dependency override in pubspec.yaml first.
dependency_overrides:
ffi: ^2.0.1
If it doesn't work, add both the conflicting dependencies in pubspec.yaml without specifying version like,
dependencies:
tflite_flutter:
file_picker:
It automatically selects the version that works without conflicts.
If it does work, in the pubspec.lock file, you can see the version it selected, like
bloc:
dependency: transitive
description:
name: bloc
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.0"
Just add this version to pubspec.yaml file. This ensures you don't fetch different version whenever you run pub get.
This will work for now. But it is not always good idea to use the old version. So always look for the packages new version.
Hope it helps!
In this case to you have 3 options:
bump version of the tflite_flutter if possible
downgrade version of the file_picker
use 'dependency_overrides' in your yaml file for ffi
Because hr depends on flutter_session ^0.1.1 which depends on shared_preferences ^0.5.8, shared_preferences ^0.5.8 is required.
So, because hr depends on shared_preferences ^2.0.4, version solving failed.
pub get failed (1; So, because hr depends on shared_preferences ^2.0.4, version solving failed.) Process finished with exit code 1
my pubspec.yaml code
dependencies:
flutter:
sdk: flutter
flutter_session: ^0.1.1
shared_preferences: ^2.0.4
how to overcome it?
flutter_session: ^0.1.1 depends on dart sdk 2.7.0 whilst shared_preferences: ^2.0.4 depends on dart sdk 2.12, hence the error.
you might have to use this pull request for flutter_session which is updated to flutter 2.0 and latest dart sdk
https://github.com/jhourlad/flutter_session/pull/11
in pubspec.yaml
flutter_session:
git:
url: https://github.com/RomanIvn/flutter_session.git
ref: master
flutter pub get:
Because firebase_auth >=1.0.0 depends on firebase_auth_web ^1.0.0 which depends on http_parser ^4.0.0, firebase_auth >=1.0.0 require
s http_parser ^4.0.0.
And because http 0.12.2 depends on http_parser >=0.0.1 <4.0.0 and no versions of http match >0.12.2 <0.13.0, firebase_auth >=1.0.0 i
s incompatible with http ^0.12.2.
So, because p1 depends on both http ^0.12.2 and firebase_auth ^1.0.0, version solving failed.
Running "flutter pub get" in p1...
pub get failed (1; So, because p1 depends on both http ^0.12.2 and firebase_auth ^1.0.0, version solving failed.)
I just ran flutter upgrade so my flutter and dart packages are up to date, and through sdk manager (in tools) I have android 10 and 11 installed along with required sdk tools. Android studio has no pending updates for dev channel. (5th March, 2021)
The firebase versions were included just yesterday.
dependencies:
http: "^0.12.2"
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
firebase_core: ^1.0.0
firebase_auth: ^1.0.0
firebase_database: ^6.1.0
I apologize if I am missing something right under my nose.
Edit: Yes, I totally missed it. I just had to look up http in pub.get then change the version. (latest: http: "^0.13.0") Please delete this if required.
Solution: I changed the version of http in dependencies (pubspec.yaml) from the older version to http: "^0.13.0" (latest as of 5th March 2021) (get the version from pub.dev and type in http, go to installing tab, and you'll find the version there).
Then run flutter pub get, or whatever suits your needs.
My current dependencies:
dependencies:
http: "^0.13.0"
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0
firebase_core: ^1.0.0
firebase_auth: ^1.0.0
firebase_database: ^6.1.0
If anyone else wants to share anything related, please do! Thank you.
Because date_picker_timeline >=1.1.0 depends on intl ^0.16.0 and every version of flutter_localizations from sdk depends on intl 0.17.0, date_picker_timeline >=1.1.0 is incompatible with flutter_localizations from sdk.
And because easy_localization >=2.1.0+1 depends on flutter_localizations any from sdk, date_picker_timeline >=1.1.0 is incompatible with easy_localization >=2.1.0+1.
So, because TimyTimeMain depends on both date_picker_timeline ^1.1.3 and easy_localization ^2.3.3, version solving failed.
intl: ">=0.16.0 <=0.17.0-nullsafety.2"
easy_localization: ^2.3.3
date_picker_timeline: ^1.1.3
the Date Picker has a new version -
dependencies:
date_picker_timeline: ^1.2.1
https://pub.dev/packages/date_picker_timeline/install
Please update this data in your pubspec.yaml
Also, you can check the version for the Intl package and others if necessary
https://pub.dev/packages/intl/install
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.
Because chat_applicaion depends on firebase_analytics >=0.0.2 <0.3.0 which requires SDK version >=1.8.0 <2.0.0, version solving failed.pub get failed (1)
I have change flutter SDK but still getting the same error.