Flutter Device Preview and Firebase Auth Incompatible

1,313

To solve the issue, you can take the following steps to check for the compatible version

  1. Change the version number of the flutter_bloc to any
  2. This will resolve the issue
  3. You can then check which version was automatically selected and use it
Share:
1,313
Devyker
Author by

Devyker

Updated on December 26, 2022

Comments

  • Devyker
    Devyker over 1 year

    Pubspec.yaml
    dependencies:
    flutter: sdk: flutter bloc: ^6.1.0 cloud_firestore: ^0.14.3 cupertino_icons: ^1.0.0 device_preview: ^0.5.5 firebase_auth: ^0.18.3 firebase_core: ^0.5.2 firebase_storage: ^5.0.1 fl_chart: ^0.12.2 flutter_bloc: ^6.1.1 flutter_sms: ^2.1.1 flutter_spinkit: ^4.1.2+1 flutter_svg: ^0.19.1 google_nav_bar: ^3.1.0 http: ^0.12.2 liquid_swipe: ^1.5.0 location: ^3.2.1 page_transition: ^1.1.7+3 persistent_bottom_nav_bar: ^3.1.0 regexpattern: ^1.0.0

    ERROR RECEIVED

    Because firebase_auth >=0.18.3 <=0.18.3 depends on firebase_auth_web ^0.3.2 and no versions of firebase_auth match >0.18.3+1 <0.18.4, firebase_auth >=0.18.3 <0.18.3+1 or >0.18.3+1 <0.18.4-∞ requires firebase_auth_web ^0.3.2.
    Because firebase_auth >=0.18.4 <=0.18.4 depends on firebase_auth_web ^0.3.2+2 and firebase_auth >=0.18.4+1 depends on firebase_auth_web ^0.3.2+3, firebase_auth >=0.18.4 requires firebase_auth_web ^0.3.2+2. Thus, firebase_auth >=0.18.3 <0.18.3+1 or >0.18.3+1 requires firebase_auth_web ^0.3.2.
    And because firebase_auth 0.18.3+1 depends on firebase_auth_web ^0.3.2+1, firebase_auth >=0.18.3 requires firebase_auth_web ^0.3.2.
    And because firebase_auth_web >=0.3.0-dev.1 depends on intl ^0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2, firebase_auth >=0.18.3 is incompatible with flutter_localizations from sdk.
    And because device_preview 0.5.5 depends on flutter_localizations any from sdk and no versions of device_preview match >0.5.5 <0.6.0, firebase_auth >=0.18.3 is incompatible with device_preview ^0.5.5.


    There are some dependency version issues, let me know how to correct it.

    • Hamza
      Hamza over 3 years
      remove the version and use the key word any let me know if it solves. For instance, firebase_auth: any
    • kragekjaer
      kragekjaer about 3 years
      I see the same firebase mess. Did you manage to solve it?
    • Bensal
      Bensal about 3 years
      Using any solved my problem. Thank you @Hamza