Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

After installing Plugin.MediaManager 0.7.1 in my Xamarin Forms project, the Android build gives me 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  Readings4.Android   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets    2816    

Tools: Microsoft Visual Studio Community 2019 Version 16.1.6

like image 392
Andy Joiner Avatar asked Jul 14 '19 13:07

Andy Joiner


1 Answers

No Dex compiler was specified, select D8 Dex compiler in the Android project properties:

Dex compiler option

In code:

<AndroidDexTool>d8</AndroidDexTool>
like image 111
Andy Joiner Avatar answered Nov 13 '22 07:11

Andy Joiner