f-miyu / Plugin.FirebaseAuth

MIT License
61 stars 26 forks source link

Default FirebaseApp is not initialized in this process com.plugin.firebaseauth.sample. #6

Open SagarPanwala opened 5 years ago

enisn commented 4 years ago

@SagarPanwala Did you add fingerprint of your .keystore file to firebase?

efimomax commented 4 years ago

Call

Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle); and FirebaseApp.InitializeApp(Application.Context); in MainActivity.OnCreate

Explicitly call FirebaseApp.InitializeApp(Application.Context); just before the LoadApplication(..)

actopozipc commented 4 years ago

Edit: Make sure to set the build action of your google-services.json to GoogleServicesJson. This solved the exception for me.

Same problem for me.


  protected override void OnCreate(Bundle bundle)
        {

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            Xamarin.Essentials.Platform.Init(this, bundle);
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
            FirebaseApp.InitializeApp(Application.Context);
            LoadApplication(new App());
        }
timarsha commented 3 years ago

I had the same problem, I added nuget Xamarin.Firebase.Auth for Android