Specified cast is not valid.

Hi, 
I am trying to  use SfNavigationDrawer 16.2.0.50 or 16.3.0.17 or 16.3.0.21.  I am using Xamarin.Forms 3.2.0.839982 and MvvmCross.Forms 6.1.2 . I have the working page on iOS platform, but on android I get a error - InvalidCostException without StackTrace, only a message "Specified cast is not valid."  The same page. Next I removed all elements and left only sfNavigationDrawer and have the same error. 

System.InvalidCastException
Specified cast is not valid.

System.Diagnostics.Debugger.Mono_UnhandledException_internal() in 
System.Diagnostics.Debugger.Mono_UnhandledException(System.InvalidCastException ex) in  
object.48() in 
Com.Syncfusion.Navigationdrawer.DrawerLayout..ctor(Android.App.Application context, Com.Syncfusion.Navigationdrawer.SfNavigationDrawer slideDrawer, bool is_SecondaryDrawer) in 
Com.Syncfusion.Navigationdrawer.SfNavigationDrawer.InitiateLayout() in 
Com.Syncfusion.Navigationdrawer.SfNavigationDrawer.OnSizeChanged(int w, int h, int oldw, int oldh) in 
Android.Views.View.n_OnSizeChanged_IIII(System.IntPtr jnienv, System.IntPtr native__this, int w, int h, int oldw, int oldh) in 
object.48() in 
Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a() in 
Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) in 
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod(string encodedMember, Com.Syncfusion.Navigationdrawer.SfNavigationDrawer self, Java.Interop.JniArgumentValue* parameters) in 
Android.Views.ViewGroup.Layout(int l, int t, int r, int b) in 
Xamarin.Forms.Platform.Android.ViewRenderer.OnLayout(bool changed, int l, int t, int r, int b) in D:/a/1/s/Xamarin.Forms.Platform.Android/ViewRenderer.cs:199
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII(System.IntPtr jnienv, System.IntPtr native__this, bool p0, int p1, int p2, int p3, int p4) in D:/a/1/s/Xamarin.Forms.Platform.Android.FormsViewGroup/obj/Release/generated/src/Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198
object.36() in 
Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a() in 
Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) in 
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(string encodedMember, Syncfusion.SfNavigationDrawer.XForms.Droid.SfNavigationDrawerRenderer self, Java.Interop.JniArgumentValue* parameters) in 
Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout(int p0, int p1, int p2, int p3, int p4, int p5) in D:/a/1/s/Xamarin.Forms.Platform.Android.FormsViewGroup/obj/Release/generated/src/Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181
Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout() in D:/a/1/s/Xamarin.Forms.Platform.Android/VisualElementTracker.cs:102
Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout() in D:/a/1/s/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs:134
Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout(System.Collections.ObjectModel.ReadOnlyCollection children) in D:/a/1/s/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs:310
Xamarin.Forms.Platform.Android.VisualElementRenderer.OnLayout(bool changed, int l, int t, int r, int b) in D:/a/1/s/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs:296
Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII(System.IntPtr jnienv, System.IntPtr native__this, bool p0, int p1, int p2, int p3, int p4) in D:/a/1/s/Xamarin.Forms.Platform.Android.FormsViewGroup/obj/Release/generated/src/Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198

Attachment: Screen_Shot_20180926_at_10.56.26_(2)_defccaea.zip

1 Reply

PA Paul Anderson S Syncfusion Team September 27, 2018 09:57 AM UTC

Hi Viktor, 
 
Greetings from Syncfusion. 
 
We are able to reproduce the reported issue with SfNavigationDrawer at our end. We have updated the details in the support Incident created by you in your DirectTrac account. We will assist you through incident under your Direct Trac account.  
 
Our Direct Trac support system can be accessed from the following link:  
                                
 
Regards, 
Paul Anderson 


Loader.
Up arrow icon