Java.Lang.NoSuchMethodError: no non-static method "Landroid/widget/CompoundButton Xamarin.Android

BageraBagera USMember ✭✭

I get this error:

Java.Lang.NoSuchMethodError: no non-static method "Landroid/widget/CompoundButton;.getButtonDrawable()Landroid/graphics/drawable/Drawable;

When I am using a radio button ButtonDrawable like this:

`if(myRadioButton.ButtonDrawable == null)
{
    //Do Something
}`

I tested the app on android API = 23 (Marshmallow) and it works fine. I get this error for android API < 23 (older than Marshmallow)

I am using Xamarin.Android.Support.Design version 25.3.1

Any idea to fix it?

Best Answer

Answers

Sign In or Register to comment.