【发布时间】:2019-04-11 10:28:14
【问题描述】:
我正在使用 Xamarin 开发我的应用程序。 我对 UWP 和 iOs 等其他平台没有任何问题。
但是当我尝试构建 Android 应用时,我收到以下错误:
Errors shown in Visual Studio 2017
所有这些错误都是指下面显示的“attrs.xml”文件:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<declare-styleable name="DrawableStates">
<attr name="state_indeterminate" format="boolean" />
</declare-styleable>
<declare-styleable name="SfCheckBox">
<attr name="isthreestate" format="boolean" />
<attr name="cornerradius" format="float" />
<attr name="checked" format="enum">
<enum name="unchecked" value="0" />
<enum name="indeterminate" value="1" />
<enum name="checked" value="2" />
</attr>
</declare-styleable>
<declare-styleable name="SfSegmentedControl">
<!-- The selected index of SfSegmentCondrol-->
<attr name="segmentSelectedIndex" format="integer" />
<!-- The backcolor of SfSegmentCondrol-->
<attr name="segmentBackColor" format="color" />
<!-- The border color of SfSegmentCondrol-->
<attr name="segmentBorderColor" format="color" />
<!-- The border thickness of SfSegmentCondrol-->
<attr name="segmentBorderThickness" format="string" />
<!-- The color of SfSegmentCondrol-->
<attr name="segmentColor" format="color" />
<!-- The segment padding of SfSegmentCondrol-->
<attr name="segmentedPadding" format="string" />
<!-- The segment height of SfSegmentCondrol-->
<attr name="segmentedHeight" format="string" />
<!-- The segment width of SfSegmentCondrol-->
<attr name="segmentedWidth" format="string" />
<!-- The stroke thickness of SfSegmentCondrol-->
<attr name="segmentStrokeThickness" format="string" />
<!-- The corner radius of SfSegmentCondrol-->
<attr name="segmentCornerRadius" format="string" />
<!-- The position of SfSegmentCondrol-->
<attr name="segmentPosition" format="enum">
<enum name="top" value="0" />
<enum name="bottom" value="1" />
<enum name="fill" value="2" />
<enum name="border" value="3" />
</attr>
<!-- The displaymode of SfSegmentCondrol-->
<attr name="segmentDisplayMode" format="enum">
<enum name="image" value="0" />
<enum name="text" value="1" />
<enum name="imagewithtext" value="2" />
</attr>
</declare-styleable>
</resources>
我的“attrs.xml”文件有问题吗? 我已经尝试清理和重建解决方案。删除并再次添加每个包,但错误仍然存在。
感谢您的帮助。
【问题讨论】:
标签: xamarin xamarin.forms xamarin.android