Grid not working Android 5.1.1

Hi,

The columns of type GridSwitchColumn seem to break the SfDataGrid control on the current version of the nuget on Android 5.1.1. When we try to show a page with a grid that uses a GridSwitchColumn column, we get this error :

IncompatibleClassChangeError no non-static method "Landroid/widget/CompoundButton	.getButtonDrawable()Landroid/graphics/drawable/Drawable	"    at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (Java.Interop.JniObjectReference type, System.String name, System.String signature) <0xdb85eb10 + 0x00109> in <4ab4da567937419a91d69e2057a4f98b>:0    at Java.Interop.JniType.GetInstanceMethod (System.String name, System.String signature) <0xdb877570 + 0x00099> in <4ab4da567937419a91d69e2057a4f98b>:0    at Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo (System.String encodedMember) <0xdb872460 + 0x000e4> in <4ab4da567937419a91d69e2057a4f98b>:0    at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) <0xdb874520 + 0x00081> in <4ab4da567937419a91d69e2057a4f98b>:0    at Android.Widget.CompoundButton.get_ButtonDrawable () <0xdbcf74c0 + 0x00075> in <0f794d26e67f44c799148d83a1269e92>:0    at Syncfusion.SfDataGrid.XForms.Droid.Renderer.SfSwitchRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) <0xd7d4a9d0 + 0x00290> in <85ed775d3d5342c9917a5273378cc3d9>:0    at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) <0xd80513a0 + 0x00309> in <41c62ef5294c490cb793ec745b9dc405>:0    at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) <0xd8050890 + 0x00104> in <41c62ef5294c490cb793ec745b9dc405>:0    at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) <0xd7fce720 + 0x00152> in <41c62ef5294c490cb793ec745b9dc405>:0    at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) <0xd804ef20 + 0x00252> in <41c62ef5294c490cb793ec745b9dc405>:0 [...]

The control seems to be working on Android 6.0+. From my understanding, the problem is that the control tries to call a function that has been implemented on Android 6.0, so that would explain why it doesn't work on Android 5.1.1.

The control also seemed to be working fine when we were using the nuget on version 18.1.0.48, so it seems like a somewhat new issue.

Is there anything that can be done to fix this issue? The tablet that has this issue can't be updated to Android 6.0...


Here's some info, not sure if important : 

Phone : Getac zx70 on Android 5.1.1

Nuget version : 19.1.0.57

Xamarin.Forms version : 5.0.0.2125


Thanks


1 Reply

SV Suja Venkatesan Syncfusion Team February 25, 2022 02:22 PM UTC

Hi Maxence, 

We have already the fix for the reported issue “No non-static method "CompoundButton .getButtonDrawable()” in 19.1.0.58 version. Please refer our documentation in below link for your reference. 


Please let us know if you need any further assistance. 

Regards, 
Suja 


Loader.
Up arrow icon