Error when changing the style to dark from the system

Viewed 76

I have an error, when changing the style to dark from the system.

error in MainActivity.cs base.OnCreate(savedInstanceState);

error text: System.NotSupportedException: 'Unable to find the default constructor on type Xamarin.Forms.Platform.Android.ShellItemRenderer.Please provide the missing constructor.'

The function:

   protected override void OnCreate(Bundle savedInstanceState)
     {

         CrossFingerprint.SetCurrentActivityResolver(() => this);

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

         base.OnCreate(savedInstanceState); **// in this line**
         Window.DecorView.LayoutDirection = LayoutDirection.Rtl;

         Xamarin.Essentials.Platform.Init(this, savedInstanceState);
         ZXing.Net.Mobile.Forms.Android.Platform.Init();

         global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
         Xamarin.FormsGoogleMaps.Init(this, savedInstanceState);

         LoadApplication(new App());
     }
0 Answers
Related