ASH-1598 avatar image
0 Votes"
ASH-1598 asked WenyanZhang-MSFT edited

Where can I find ShellItemRenderer?

Hi guys

I have an Error when changing the style to dark from the system

error in MainActivity.cs

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);
              global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
              Xamarin.FormsGoogleMaps.Init(this, savedInstanceState);
              LoadApplication(new App());
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you use Customrenderers to custom ShellItemRenderer in your project? Would you mind sharing more information about Resource.Layout.Tabbar?And which Android version you test on ? TabLayoutResource = Resource.Layout.Tabbar;ToolbarResource = Resource.Layout.Toolbar; has been obsolete after AndroidX.

0 Votes 0 ·

0 Answers