问题
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
回答1:
No Dex compiler was specified, select D8 Dex compiler in the Android project properties:
In code:
<AndroidDexTool>d8</AndroidDexTool>
来源:https://stackoverflow.com/questions/57027952/xamarin-build-error-defining-a-default-interface-method-requires-min-sdk-vers