我正在Xamarin.Forms项目上工作,在安装了James Montemagno的Xamarin和Windows名为Xam.Plugin.Geolocator的Windows Geolocator插件后,在Android项目中出现了这样的错误:

Severity Code Description Project File Line Suppression State Error
java.lang.IllegalArgumentException:
already added :
Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;


这是什么意思,如何解决?

最佳答案

引发错误是因为我在.Droid项目中引用了Xamarin.Android.Support.Compat.25.4.0.2。它与Xam.Plugin.Geolocator无关。感谢@sme和@Jon Douglas的有用评论。

我设法通过将Xamarin.Android.Support.v4.23.3.0更新为版本Xamarin.Android.Support.v4.25.4.0.2来解决该错误。

08-05 19:52
查看更多