【发布时间】:2018-03-04 22:11:01
【问题描述】:
下午好,
我今天决定使用 Xamarin,但在使用 Vector 图像时遇到了一些问题。我遵循了here 的说明,并在我的布局中包含以下内容:
<ImageView
app:srcCompat="@drawable/fort"
android:layout_height="wrap_content"
android:id="@+id/imageView1" />
但是,我在运行时收到以下错误:
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 配置是正确的答案吗?
【问题讨论】:
-
假设您已将活动继承更改为
AppCompatActivity并添加Android.Support.v7.AppCompat? -
@SushiHangover 我有
-
如果对你有帮助请采纳我的回答
标签: xamarin xamarin.android android-support-library android-vectordrawable