Home > Software engineering >  Firebase core dependency error (Flutter/Firebase)
Firebase core dependency error (Flutter/Firebase)

Time:12-13

I create a project a little while ago, in Flutter. This week I went back to it and updated the dependencies. Suddenly I'm getting this new error:

Because firebase_core ^0.5.2 1 depends on firebase_core_platform_interface ^2.1.0 and firebase_storage >=7.0.0 <8.0.0-1.0.nullsafety.0 depends on firebase_core_platform_interface ^3.0.1, firebase_core ^0.5.2 1 is incompatible with firebase_storage >=7.0.0 <8.0.0-1.0.nullsafety.0.
So, because [project_name] depends on both firebase_storage ^7.0.0 and firebase_core ^0.5.3, version solving failed.
pub get failed (1; So, because [project_name] depends on both firebase_storage ^7.0.0 and firebase_core ^0.5.3, version solving failed.)

I've searched online and can see that it's a recurring problem that loads of people have faced without any solutions. I'm just hoping someone here has a fix specific to mine. Any help is appreciated. Below is my dependencies section in the pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  getflutter: ^1.0.10
  #firebase_auth: ^0.20.1
  #cloud_firestore: ^0.16.0
  image_picker: ^0.6.3 4
  #firebase_storage: ^7.0.0
  provider: ^4.0.4
  gender_selector: ^1.0.6
  gender_selection: "^0.0.8"
  flutter_spinkit: "^4.1.2"
  place_picker: ^0.9.11
  flutter_country_picker: ^0.1.6
  multi_image_picker: ^4.6.7
  firebase_auth: "^0.18.4 1"
  firebase_crashlytics: "^0.4.0"
  cloud_firestore: "^0.16.0"
  cloud_functions: "^0.9.0"
  firebase_storage: "^7.0.0"
  firebase_core: ^0.5.3
  firebase_database: ^7.1.1

CodePudding user response:

Update your firebase dependencies to the latest version:

dependencies:
  flutter:
    sdk: flutter
  firebase_auth: ^3.3.3
  firebase_crashlytics: ^2.4.3
  cloud_firestore: ^3.1.4
  cloud_functions: ^3.2.3
  firebase_storage: ^10.2.3
  firebase_core: ^1.10.5
  firebase_database: ^9.0.3

CodePudding user response:

I'm not sure what I did to resolve this problem. After changing loads of things and changing the dart SDK to the latest one, it seems to work fine.

  • Related