android R文件生成错误

定义了资源文件如下

<declare-styleable name="ContentBox">
    <attr name="distanceToText" format="dimension" />
    <attr name="distanceBetweenText" format="dimension" />
    <attr name="titleColor" format="color" />
    <attr name="textColor" format="color"></attr>
    <attr name="textSizeTitle" format="dimension"></attr>
    <attr name="textSizeText" format="dimension"></attr>
    <attr name="paddingVerticalTitle" format="dimension"></attr>
    <attr name="paddingLeftTitle" format="dimension"></attr>
    <attr name="paddingHorizontalText" format="dimension"></attr>
    <attr name="titleBackgroundColor" format="color"></attr>
    <attr name="frameColor" format="color"></attr>
    <attr name="backgroundColorClickable" format="color"></attr>
    <attr name="title" format="string"></attr>
    <attr name="textSizeColumnOne" format="dimension"></attr>
    <attr name="textSizeColumnTwo" format="dimension"></attr>
    <attr name="textColorColumnOne" format="color"></attr>
    <attr name="textColorColumnTwo" format="color"></attr>
    <attr name="distanceBetweenTextHoriz"></attr>
</declare-styleable>


结果出现了如下提示
insert “}” to complete ClassBody in R.class

原因如此:

最后一个属性木有定义属性,有木有,赶紧去修改楼!

猜你喜欢

转载自201304223510.iteye.com/blog/1964375