Xamarin Android(此应用程序使用不正确的配置构建)

男儿欲遂平生志,六经勤向窗前读。这篇文章主要讲述Xamarin Android:此应用程序使用不正确的配置构建相关的知识,希望能为你提供帮助。
下午好,
我决定今天玩Xamarin,我一直有一些问题让Vector图像工作。我按照说明here并在我的布局中有以下内容:

< ImageView app:srcCompat="@drawable/fort" android:layout_height="wrap_content" android:id="@+id/imageView1" />

但是,我在运行时收到以下错误:
【Xamarin Android(此应用程序使用不正确的配置构建)】Unhandled Exception: java.Lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. occurred
在Google中抛出这个错误,我得到了一些链接,最值得注意的是this StackOverflow post,其中大多数答案都引用了原生Android SDK并包含Gradle文件修改,但我不确定。我从VS项目中看不到任何Gradle内容,所以我不确定是否应该编辑它们。
我该怎么做才能解决这个问题,是否正在修改Gradle配置?
答案将Xamarin.Android.Support.Vector.Drawable nuget package添加到您的Xamarin.Android项目中。
注意:Xamarin.Android.Support.Vector.Drawable nuget包中包含一个.targets文件,该文件将参数--no-version-vectors附加到AndroidResgenExtraArgs构建属性值,以确保将参数传递给aapt调用。
这基本上相当于编辑Gradle文件。在这里找到的信息:qazxsw poi

    推荐阅读