Xamarin build error: defining a default interface method requires –min-sdk-version >= 24

I added to my project Xam.Plugins.Android.ExoPlayer and then I received this error:

java/lang/Object;I)V: defining a default interface method requires –min-sdk-version >= 24 (currently 13) for interface methods: com.google.android.exoplayer2.Player$EventListener.onTimelineChanged : (Lcom/google/android/exoplayer2/Timeline;Ljava/lang/Object;I)V

Looking around, I discovered that other people had the same issue and the problem sits in the Android Options in Project Properties. No Dex compiler was specified, select D8 Dex compiler in the Android project properties:

android-project-options

In code:

<AndroidDexTool>d8</AndroidDexTool>

Happy coding!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.