unoplatform/Uno.Samples

[ToyCar] Exception error coming when running for android.

Opened this issue · 0 comments

There is an exception error coming when running ToyCar with android as startup project.
The same application is working completley fine for windows , android and wasm.

System.InvalidOperationException: 'Failed to load ToyCar.MainPage: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.UI.Xaml.Controls.TwoPaneView.OnApplyTemplate() in C:\a\1\s\src\Uno.UI\Microsoft\UI\Xaml\Controls\TwoPaneView\TwoPaneView.cs:line 54
   at Microsoft.UI.Xaml.Controls.Control.set_TemplatedRoot(View value) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 297
   at Microsoft.UI.Xaml.Controls.Control.UpdateTemplate() in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 583
   at Microsoft.UI.Xaml.Controls.Control.SetUpdateControlTemplate(Boolean forceUpdate) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 236
   at Microsoft.UI.Xaml.Controls.Control.OnTemplateChanged(DependencyPropertyChangedEventArgs e) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 218
   at Microsoft.UI.Xaml.Controls.Control.<>c.<.cctor>b__365_0(DependencyObject s, DependencyPropertyChangedEventArgs e) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 213
   at Microsoft.UI.Xaml.PropertyMetadata.RaisePropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) in C:\a\1\s\src\Uno.UI\UI\Xaml\PropertyMetadata.cs:line 192
   at Microsoft.UI.Xaml.DependencyObjectStore.InvokeCallbacks(DependencyObject actualInstanceAlias, DependencyProperty property, DependencyPropertyDetails propertyDetails, Object previousValue, DependencyPropertyValuePrecedences previousPrecedence, Object newValue, DependencyPropertyValuePrecedences newPrecedence, Boolean bypassesPropagation) in C:\a\1\s\src\Uno.UI\UI\Xaml\DependencyObjectStore.cs:line 1893
   at Microsoft.UI.Xaml.DependencyObjectStore.RaiseCallbacks(DependencyObject actualInstanceAlias, DependencyPropertyDetails propertyDetails, Object previousValue, DependencyPropertyValuePrecedences previousPrecedence, Object newValue, DependencyPropertyValuePrecedences newPrecedence) in C:\a\1\s\src\Uno.UI\UI\Xaml\DependencyObjectStore.cs:line 1798
   at Microsoft.UI.Xaml.DependencyObjectStore.InnerSetValue(DependencyProperty property, Object value, DependencyPropertyValuePrecedences precedence, DependencyPropertyDetails propertyDetails, Boolean isPersistentResourceBinding) in C:\a\1\s\src\Uno.UI\UI\Xaml\DependencyObjectStore.cs:line 506
   at Microsoft.UI.Xaml.DependencyObjectStore.SetValue(DependencyProperty property, Object value, DependencyPropertyValuePrecedences precedence, DependencyPropertyDetails propertyDetails, Boolean isPersistentResourceBinding) in C:\a\1\s\src\Uno.UI\UI\Xaml\DependencyObjectStore.cs:line 437
   at Microsoft.UI.Xaml.DependencyObjectStore.SetValue(DependencyProperty property, Object value) in C:\a\1\s\src\Uno.UI\UI\Xaml\DependencyObjectStore.cs:line 391
   at Uno.UI.Controls.BindableView.SetValue(DependencyProperty dp, Object value) in C:\a\1\s\src\Uno.UI\Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.DependencyObject.DependencyObjectGenerator\Uno.UI.Controls.BindableView_eefac468be1af0c618115e95339af76c.cs:line 65
   at Microsoft.UI.Xaml.Setter.ApplyTo(DependencyObject o) in C:\a\1\s\src\Uno.UI\UI\Xaml\Setter.cs:line 142
   at Microsoft.UI.Xaml.Style.ApplyTo(DependencyObject o, DependencyPropertyValuePrecedences precedence) in C:\a\1\s\src\Uno.UI\UI\Xaml\Style\Style.cs:line 87
   at Microsoft.UI.Xaml.FrameworkElement.OnStyleChanged(Style oldStyle, Style newStyle, DependencyPropertyValuePrecedences precedence) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.cs:line 655
   at Microsoft.UI.Xaml.FrameworkElement.ApplyStyle() in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.cs:line 426
   at Microsoft.UI.Xaml.FrameworkElement.ApplyStyles() in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.cs:line 363
   at Microsoft.UI.Xaml.FrameworkElement.CreationComplete() in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.cs:line 380
   at ToyCar.MainPage.<>c.<InitializeComponent>b__19_7(TwoPaneView c84, MainPage __that, NameScope __nameScope) in C:\Users\DarshPatel\Desktop\QA\samples\Uno.Samples\UI\ToyCar\ToyCar.Mobile\Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d1a7753ba8c52a0f10a6685be829530d.cs:line 1452
   at Uno.UI.Helpers.Xaml.ApplyExtensions.GenericApply[TwoPaneView,MainPage,NameScope](TwoPaneView instance, MainPage arg1, NameScope arg2, Action`3 apply) in C:\a\1\s\src\Uno.UI\UI\Xaml\Markup\ApplyExtensions.cs:line 58
   at ToyCar.MainPage.InitializeComponent() in C:\Users\DarshPatel\Desktop\QA\samples\Uno.Samples\UI\ToyCar\ToyCar.Mobile\Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d1a7753ba8c52a0f10a6685be829530d.cs:line 79
   at ToyCar.MainPage..ctor() in C:\Users\DarshPatel\Desktop\QA\samples\Uno.Samples\UI\ToyCar\ToyCar.Shared\MainPage.xaml.cs:line 36
   at ToyCar.Mobile.MetadataBuilder_645.CreateInstance() in C:\Users\DarshPatel\Desktop\QA\samples\Uno.Samples\UI\ToyCar\ToyCar.Mobile\Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.BindableTypeProviders.BindableTypeProvidersSourceGenerator\BindableMetadata.g.cs:line 26749
   at Microsoft.UI.Xaml.Controls.Frame.CreatePageInstance(Type sourcePageType) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:line 475
   at Microsoft.UI.Xaml.PagePool.DequeuePage(Type pageType) in C:\a\1\s\src\Uno.UI\UI\Xaml\PagePool.cs:line 69
   at Microsoft.UI.Xaml.Controls.Frame.CreatePageInstanceCached(Type sourcePageType) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:line 465
   at Microsoft.UI.Xaml.Controls.Frame.EnsurePageInitialized(PageStackEntry entry) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:line 455
   at Microsoft.UI.Xaml.Controls.Frame.InnerNavigate(PageStackEntry entry, NavigationMode mode) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:line 305'

ToyCar.zip