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.
Related
I would like to develop a server that let clients can communicate with each other in the Server. When I add server to dependecies, here is the error.
Error Message:
Because every version of server depends on http ^0.11.3+16 and every version of zego_uikit_prebuilt_live_audio_room depends on http ^0.13.4, server is incompatible with zego_uikit_prebuilt_live_audio_room.
So, because flutter_app depends on both zego_uikit_prebuilt_live_audio_room ^1.0.7 and server any, version solving failed.
pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.17.3 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
firebase_core: ^2.2.0
firebase_auth: ^4.1.2
google_sign_in: ^5.3.3
jitsi_meet: ^4.0.0
cloud_firestore: ^4.0.5
connectivity_plus: ^3.0.2
firebase_storage: ^11.0.10
provider: ^6.0.5
firebase_database: ^10.0.9
zego_uikit_prebuilt_live_audio_room: ^1.0.7
flutter_nearby_connections: ^1.1.1
flutter_blue: ^0.8.0
get: ^4.6.5
I can't get pub...
How can I solve the problem?
Thanks a lot.
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
Im trying to implement ImagePicker to my Flutter project but when i try to import the package: import 'package:image_picker/image_picker.dart'; it only shows error. I have added it to my pubspec.yaml file as a dependecie but it displayed this error when I reopened the VS:
Because LPP requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because LPP requires SDK version >=2.12.0 <3.0.0, version solving failed.)
exit code 1
This is my pubspec.ymal file:
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
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
image_picker: ^0.7.2+1
So any help would be great. Thanks in advance :) <3
Which flutter- and dart-version shows "flutter doctor -v"?
Your sdk has to be >= 2.12
If you don't use flutter 2 with dart 2.12 than upgrade flutter (I have currently massive problem with this) or downgrade the versions of sdk, Cupertino-icons and image-picker in the pubspec.yaml-file
Ok so I changed version from 7.2+1 to 6.2 and now it works. :)
Here's the error in console, plus flutter doctor didn't showed any error. I've tried upgraded the android sdk to 28, check build.gradle. It still don't work and I have no clue.
Error
Pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
google_fonts: ^1.1.1
path_provider: ^1.6.24
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
1- Move them to dependencies
2- Leave a space at the beggining of the dependencie name like so:
dependencies:
flutter:
sdk: flutter
firebase_core: ^0.5.1
firebase_auth: ^0.18.2
google_fonts: ^1.1.0
provider: ^4.3.2+2
If you realize, it's like if flutter and the rest of your dependencies were at the same level
Its AAPT issue;
Open this open C:\Users\user\Desktop\Projects\Flutter\eLesson\android\app\src\main\AndroidManifest.xml and remove style/Theme.AppCompat.Light.NoActionBar
and
your App or some of you plugin is not compatible to AndroidX. Open android folder of your project in separate Android Studio. Right click on Project->Refactor->Migrate to AndroidX.
Repeat this process for each of your plugin folder.
Clean and Rebuild.
Enjoy.
I'm trying to fetch JSON data using built_value serializer but after setting built_value package in yaml file getting an error like:
Because built_value_generator >=5.5.3 depends on analyzer ^0.32.1 and
every version of flutter_test from sdk depends on analyzer
0.31.2-alpha.2, built_value_generator >=5.5.3 is incompatible with flutter_test from sdk. So, because tornado_blog_flutter depends on
both flutter_test any from sdk and built_value_generator ^5.5.3,
version solving failed. pub get failed
How to solve this error?
My yaml file:
name: flutter_layout
description: A new Flutter application.
dependencies:
flutter:
sdk: flutter
built_collection: '>=2.0.0 <4.0.0'
built_value: ^5.5.3
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
json_serializable: ^0.5.0
build_runner: ^0.9.0
built_value_generator: ^5.5.3
There's some info on this issue here. The version of analyzer used by Flutter needs to be upgraded to solve this.
There's an open issue in Flutter to this here but it doesn't seem to have been done yet.
As a workaround, you could try going back to an earlier version of built_value that doesn't require such a new version of the analyzer.