我已经测试了针对我的问题提出的每个解决方案。特别是,我的应用程序在Android调试模式下正确构建,而不是在发布模式下。返回的错误是:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:错误:执行任务LinkAssemblies时出错:错误XA2006:对元数据项'System.Void Xamarin.Forms的引用。绑定::。ctor(System.String,Xamarin.Forms.BindingMode,Xamarin.Forms.IValueConverter,System.Object,System.String)'(在'XFormsProvider中定义,版本= 0.1.7.26981,Culture = neutral,PublicKeyToken = null ')来自'XFormsProvider,Version = 0.1.7.26981,Culture = neutral,PublicKeyToken = null'无法解析。
我的package.config文件是:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Acr.Settings" version="5.1.1" targetFramework="MonoAndroid70" />
<package id="Acr.Support" version="2.1.0" targetFramework="MonoAndroid70" />
<package id="Acr.UserDialogs" version="6.3.1" targetFramework="MonoAndroid70" />
<package id="AndHUD" version="1.2.0" targetFramework="MonoAndroid70" />
<package id="BCrypt.Net-PCL" version="1.0.1" targetFramework="MonoAndroid70" />
<package id="ExifLib.PCL" version="1.0.1" targetFramework="MonoAndroid70" />
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="Newtonsoft.Json" version="9.0.2-beta2" targetFramework="MonoAndroid70" />
<package id="PCLStorage" version="1.0.2" targetFramework="MonoAndroid70" />
<package id="RestSharp" version="105.2.3" targetFramework="MonoAndroid70" />
<package id="Splat" version="1.6.2" targetFramework="MonoAndroid70" />
<package id="System.Collections" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.ComponentModel.Annotations" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.ComponentModel.TypeConverter" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Globalization" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.IO" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Linq" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Reflection" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Runtime" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Threading" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="MonoAndroid70" />
<package id="Xam.Plugin.Connectivity" version="2.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="MonoAndroid70" />
<package id="Xamarin.Build.Download" version="0.4.2" targetFramework="MonoAndroid70" />
<package id="Xamarin.Firebase.Common" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.Firebase.Iid" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.Firebase.Messaging" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.Forms" version="2.3.3.180" targetFramework="MonoAndroid70" />
<package id="Xamarin.Forms.RangeSlider" version="0.6.14" targetFramework="MonoAndroid70" />
<package id="Xamarin.Forms.XamlProvider" version="0.1.7" targetFramework="MonoAndroid70" />
<package id="Xamarin.GooglePlayServices.Base" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.GooglePlayServices.Basement" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.GooglePlayServices.Tasks" version="32.940.0-beta3" targetFramework="MonoAndroid70" />
<package id="Xamarin.RangeSlider" version="0.6.14" targetFramework="MonoAndroid70" />
<package id="ZXing.Net.Mobile" version="2.1.47" targetFramework="MonoAndroid70" />
<package id="ZXing.Net.Mobile.Forms" version="2.1.47" targetFramework="MonoAndroid70" />
</packages>
我的目标SDK版本是Android 7,我的最小sdk版本是19。 你有什么想法/解决方案吗? 感谢。