Xamarin 构建错误:定义默认接口方法需要 --min-sdk-version >= 24 [英] Xamarin build error: defining a default interface method requires --min-sdk-version >= 24
本文介绍了Xamarin 构建错误:定义默认接口方法需要 --min-sdk-version >= 24的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的 Xamarin Forms 项目中安装 Plugin.MediaManager 0.7.1 后,Android 版本出现错误:
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
工具:Microsoft Visual Studio 社区 2019 版本 16.1.6
Tools: Microsoft Visual Studio Community 2019 Version 16.1.6
推荐答案
No Dex compiler was specified,在Android项目属性中选择D8 Dex compiler:
No Dex compiler was specified, select D8 Dex compiler in the Android project properties:
在代码中:
<AndroidDexTool>d8</AndroidDexTool>
这篇关于Xamarin 构建错误:定义默认接口方法需要 --min-sdk-version >= 24的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文