在Android上构建Xamarin.Forms应用时识别大量XA0106警告的元凶 [英] Identifying culprits for numerous XA0106 warnings when building Xamarin.Forms app on Android

查看:86
本文介绍了在Android上构建Xamarin.Forms应用时识别大量XA0106警告的元凶的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Xamarin.Forms应用程序,该应用程序使用了很多软件包。

We have a Xamarin.Forms application which uses quite a few packages.

构建时,我们会收到数百条这样的XA0106警告:

When building, we're getting hundreds of XA0106 warnings like this one:


/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2):警告XA0106:跳过Musterd.Droid.Resource.Attribute.MediaRouteControllerWindowBackground。请检查您的Nuget软件包版本是否兼容。 (XA0106)(Musterd.Droid)

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Warning XA0106: Skipping Musterd.Droid.Resource.Attribute.MediaRouteControllerWindowBackground. Please check that your Nuget Package versions are compatible. (XA0106) (Musterd.Droid)

我知道这是因为软件包所使用的支持库之间不匹配。问题是找出哪个!!

I know that this is because of mismatches between support libraries used by packages. The problem is finding out which one(s)!

我是否可以使用任何工具或构建设置来帮助我包导致了这种情况,因此我可以/应该更新?

Is there any tool or build setting I can use which will help me home on which packages are causing this and so which I can/should update?

推荐答案

当您使用的是Android SDK版本时,可能会发生这种情况使用与您的应用使用的Android支持包的版本不同。支持包的版本应与Android SDK的编译时相匹配。

This can happen when the version of the Android SDK you are using is different to the version of the Android support packages used by your app. The support packages are versioned in a way that should match the compile time Android SDK.

最好的解决方法是始终使用最新版本。

The best fix is to always use the latest of both.


  • 更新您的Android SDK以安装最新的稳定版。

  • 请确保您的应用针对项目中的最新版本进行编译设置。

  • 在Android项目中,将以Xamarin.Android开头的所有NuGet软件包更新为最新版本。

这篇关于在Android上构建Xamarin.Forms应用时识别大量XA0106警告的元凶的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆