Error when changing the style to dark from the system

AS_H 41 Reputation points
2021-09-11T15:24:25.633+00:00

Hi guys

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.'

  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());
        }
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
{count} votes