Flutter firebase auth UI have some issue, because of firebase_auth version miss match issue
My flutter app crashed and unable to identify an issue, after opening in an android studio, I got the issue and it is here
Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.mycom.mypetshop. Make sure to call FirebaseApp.initializeApp(Context) first.
at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@16.0.2:240)
at com.google.firebase.auth.FirebaseAuth.getInstance(Unknown Source)
at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.<init>(FirebaseAuthPlugin.java:54)
at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.registerWith(FirebaseAuthPlugin.java:47)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:20)
at com.vyapari2online.mypetshop.MainActivity.onCreate(MainActivity.java:11)
at android.app.Activity.performCreate(Activity.java:5990)
How to solve this?
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0. 1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[ 15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends on project 'firebase_auth' which depends onto com.google.firebase:[email protected] -- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:[email protected] -- Project 'app' depends on project 'cloud_firestore' which depends onto com.google.firebase:[email protected] -- Project 'app' depends on project 'google_sign_in' which depends onto com.google.android.gms:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
#flutter_firebase_ui have a lot of issues #google please hire me, I can help your developers