Version solving errror with firebase in flutter with some dependancies - firebase

I'm getting version-solving errors when trying to add firebase to my flutter project. I have already configured firebase on os and the last step is running flutter pub get. I commented out basic_utils to see if there would be any other conflicts, which is why I know it won't work with google_fonts either. Anybody know what I am doing wrong here? I suspect there are other dependencies that it will conflict with. Is this just something where I have to use an older version of firebase to make it work?
So, because jd_app depends on both firebase_storage ^8.0.0 and google_fonts ^1.1.1, version solving failed.
So, because jd_app depends on both basic_utils ^2.7.1 and firebase_auth ^1.0.1, version solving failed.
Dependencies:
dependencies:
flutter:
sdk: flutter
basic_utils: ^2.7.1
cupertino_icons: ^1.0.1
firebase_auth: ^1.0.1
firebase_core: ^1.0.1
firebase_database: ^6.1.0
firebase_storage: ^8.0.0
flutter_svg: ^0.19.3
get: ^3.24.0
google_fonts: ^1.1.1
image: ^2.1.19
maps_launcher: ^1.2.2+2
provider: ^4.3.3
url_launcher: ^5.5.0
xml: ^4.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.8.1

These are currently the stable version of firebase
firebase_core: ^0.7.0
firebase_auth: ^0.20.1
firebase_storage: ^7.0.0
cloud_firestore: ^0.16.0+1

After a search on the web, it seems that version solving can be easily remedied by following the instructions from this website:
https://iiro.dev/2018/08/28/resolving-dart-package-version-conflicts/ .
According to the link, the dependencies in conflict should be allotted the value 'any.' For example:
firebase_database: any
Subsequently, enter flutter packages get, open the newly generated pubspec.lock file, and then change the version of the dependency in your yaml file to the one in the lock file. Run flutter packages get once more and there should be no more conflicts. At least I didn't have any.

Update ALL the dependencies to the latest version. Check pub.dev to get the current versions

Related

How do I fix Firestore Flutter dependencies error?

I keep getting the same error on firebase versions
This is the YAML:
provider: ^4.3.3
firebase_database: ^4.4.0
firebase_core: ^0.7.0
firebase_auth: ^0.20.0+1
firebase_crashlytics: ^0.4.0+1
cloud_firestore: ^0.12.7+1
cloud_functions: ^0.9.0
firebase_storage: ^7.0.0
firebase_messaging: ^8.0.0-dev.14
How do I handle this?.
Every time i change one of the versions, another one get error.
Use the latest dependencies, the errors will go away. Update them in your pubspec.yaml file.

Error with version in Flutter depencies with dialogflow, firebase_auth and http

Hello to everyone and thank's to everyone who can help me.
I've this error with a Flutter projet :
Because flutter_dialogflow >=0.1.3 depends on http ^0.12.0+2 and code depends on http ^0.13.0, flutter_dialogflow >=0.1.3 is forbidden.
So, because code depends on flutter_dialogflow ^0.1.3, version solving failed.
pub get failed (1; So, because code depends on flutter_dialogflow ^0.1.3, version solving failed.)
This error came after added dialogflow. I tried to change different version and ask the community but without success.
Can anyone help me please ?
My pubspec.yaml dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
http: ^0.13.0
shared_preferences: ^2.0.5
numberpicker: ^2.0.0
firebase_core: ^1.1.0
firebase_auth: ^1.1.0
json_annotation: ^3.1.1
url_launcher: ^6.0.3
toast: ^0.1.5
charts_flutter: ^0.10.0
syncfusion_flutter_datepicker: ^19.1.56-beta
flutter_local_notifications: ^5.0.0+3
flutter_launcher_icons: ^0.8.0
flutter_native_timezone: ^1.0.10
flutter_dialogflow: ^0.1.3`
I found a solution by upgrading each dependencies and upgrading my version of the flutter sdk. (Tools --> Flutter --> Flutter Upgrade) in Intellij

Flutter Flash Chat application - Firebase problem

when iam tryin to run the app after adding the following dependencies i got this issues - by the way iam studding anjela flutter course
dependencies:
firebase_core: ^1.2.0
firebase_auth: ^1.2.0
cloud_firestore: ^2.2.0
These warnings can be safely ignored. It just indicates that the packages use deprecated APIs.

Flutter firebase version solving error arise after using firebase auth and firebase core dependencies

I'm having this issue when I've added firebase_auth dependency in my flutter project. Can anyone please help me with it?
dependencies:
cached_network_image: ^2.2.0+1
provider: ^4.3.2
firebase_core: ^0.4.5
velocity_x: ^0.4.1
flushbar: ^1.10.4
firebase_auth: ^0.16.1
flutter_dropdown: ^0.0.7+hotfix.1
You can use the following version:
firebase_core: ^0.4.4+3
firebase_auth: ^0.16.0
Please run
flutter doctor -v
If it is stable channel then use those dependencies. Firebase cause conflict if they are not properly configure.
firebase_auth: ^0.15.4
firebase_core: ^0.4.3+3
Changing to dev channel worked out for me.

firebase_analytics 0.0.4 which requires SDK version >=1.8.0 <2.0.0, version solving failed

I am trying to learn mobile devt using flutter, dat and firebase. SO as a start I downloaded the chat app code from here
But I can't seem to run the code via vscode and android studio. Can anyone please help me figure out how to run this.
error is:
VScode:
{
"resource": "/C:/Users/Administrator/Downloads/flutter-chat-app-master/flutter-chat-app-master/lib/ChatMessageListItem.dart",
"owner": "dart",
"code": "uri_does_not_exist",
"severity": 8,
"message": "Target of URI doesn't exist: 'package:firebase_database/firebase_database.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist.",
"source": "dart",
"startLineNumber": 1,
"startColumn": 8,
"endLineNumber": 1,
"endColumn": 58,
"tags": []
}
this is the error when i run it in android studio.
C:\src\flutter\bin\flutter.bat --no-color packages get Running
"flutter packages get" in flutter-chat-app-master... The current
Dart SDK version is 2.3.0-dev.0.5.flutter-a1668566e5.
Because flutter_chat_app depends on firebase_analytics 0.0.4 which
requires SDK version >=1.8.0 <2.0.0, version solving failed. pub get
failed (1)
I was able to run other sample codes, one is from this so I know that my setup is working.
I already tried few possbile solutions but not working, I saw this , but did not solve my issue.
I think the error requires me to downgrade android sdk but I dont know where to do that. I just need to run so I can see what it looks and I can follow. thanks.
You are using SDK version 2.3 and the package firebase_analytics 0.0.4 requires SDK version >=1.8.0 <2.0.0.
Some dependencies of this project are out of the date.
cupertino_icons: ^0.1.2
firebase_auth: 0.7.0
google_sign_in: 3.2.4
cloud_firestore: 0.8.2+3
fluttertoast: ^2.0.7
image_picker: 0.4.12+1
shared_preferences: 0.4.3
firebase_storage: 1.0.4
cached_network_image: ^0.7.0
intl: ^0.15.7
Update all of them to the newest version.
After a lot of googling , reinstalling, downgrade, upgrade, package get(which never worked coz the error was in the way so it exits before it could 'get'), package upgrade etc, I was finally able to solve this.
The only problem I had was I did not know which version (or what is the latest) to use coz for some reason, it wasn't indicated in their list of "versions", or least it wasn't easy to find coz I always end up in this page. Simply putting these lines (and/or doing the answer above)
environment:
sdk: '>=2.1.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
google_sign_in: ^0.3.1
firebase_analytics: ^0.0.4
firebase_auth: ^0.2.0
firebase_database: ^0.0.12
firebase_storage: ^0.0.5
in yaml did not solve it, although a lot of ppl claimed it did.
the only thing that solved it was when I happen to go in this page where it contains the correct and latest firebase versions that the latest Dart SDK where in my case - DART SDK 2.3 supports.
just get the current version to this You can search every plugin in the search bar.
my yaml looks like this now:
dependencies:
flutter:
sdk: flutter
image_picker: ^0.6.0+8
google_sign_in: ^4.0.1+3
firebase_analytics: ^3.0.1
firebase_auth: ^0.11.1+1
firebase_database: ^3.0.0
firebase_storage: ^3.0.0
Added steps which I am not sure if it is necessary, but I did it before the version correcting.
invalidate cache, restart
In relation with running the app itself, and not particular to firebase:
change gradle version by doing steps from here (because of some error with gradle not related to firebase) and look for answer of keviepanas
Fixed: i got thesame issue as when trying to run flutter upgrade, have tried all the fix online nothing seems to be working, all i deed was upgrade manually and boom, everything worked like magic
1.Download the latest stable version from https://flutter.dev/docs/get-started/install/windows
2.then copy the extracted folder to your flutter directory,
3 delete all files from your previous flutter directory, and paste in the current files
from the latest release
Note: do not delete the flutter sdk directory folder, of cause you cant cause it is already in use.
Summary: all you need do is download the latest version and replace the content(files)with your old flutter sdk files and you are good to go
This combination is working
environment:
sdk: ">=2.1.0<3.0.0"
dependencies:
firebase_core: ^0.3.4
firebase_auth: ^0.8.4+5
cloud_firestore: ^0.9.13+1
flutter:
sdk: flutter
Just try one of the previous versions. The latest one which is dev version is not worked for me. Using an old version worked for me.

Resources