Where can I find ShellItemRenderer?

AS_H 41 Reputation points
2021-09-12T19:51:17.027+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,366 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.