Xamarin 的一种信号 - 如何与 Android X 一起使用?

One Signal for Xamarin - how use with Android X?

我在我的 Xamarin Forms 应用程序中使用 OneSignal。我对 android 有疑问。我使用了一些包 我使用了几个需要 Android X 的包。这是:

-BarcodeScanner.XF

-Xam.Plugins.Android.ExoPlayer

但 OneSignal 使用 CompileSdkVersion - Android 9(Api 级别 28)。当我尝试在 android 项目(对于 Android 10)中安装 OneSignal 时,出现此错误:

 BarcodeScanner.XF 4.8.0 -> Xamarin.Android.Support.Compat (>= 28.0.0.3) 
 Com.OneSignal 3.10.1 -> Xamarin.Android.Support.CustomTabs 26.0.2 -> Xamarin.Android.Support.Compat 
(= 26.0.2).  

所以对于单个包,我需要 Android X 用于其他包 - Android 9(CompileSdkVersion)。我该如何解决这个问题?

我在 document 中找到了类似的问题,那里有解决方案。

The problem is mismatched dependencies for the two NuGets. This can be resolved by manually adding a specific version of the dependency (in this case Xamarin.Android.Support.Compat) that can support both.

请参阅此 blog post 了解更多信息和有关如何解决问题的视频。