Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Xamarin forms: NoClassDefFoundError Landroidx/appcompat/app/AppCompatActivity

mrclanmrclan USMember ✭✭

Hi guys, I'm trying to use a native android library called "ImageCropper" available here: https://github.com/ArthurHub/Android-Image-Cropper

I created android bindings, but when I try to consume it from XF custom rendered, it throws an error saying: "java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity"

I'm compiling my XF app with the target version set to API 29. Not sure what I'm missing or how would I proceed to fix this issue. Any suggestions are heartily appreciated. Thanks.

In the readme of android library repo, it is mentioned that:

**Add this line to your Proguard config file

-keep class androidx.appcompat.widget.** { *; }
**
I'm not sure how would I do this in XF.

XF custom renderer: https://pastebin.com/85Mdsy8c

Sign In or Register to comment.