我整天一直在敲打这个问题,但似乎我无法弄明白......
好的,所以我添加了一个很好并且正常工作的项目.
为了"rejuvinate"它,我决定添加操作栏与程序兼容性库(如描述在这里.
由于我添加了库,我无法再编译项目,并且我不断收到以下错误:
C:\Users\Me\Documents\Dev\MyProject\res\values\widget_attributes.xml:9: error: Attribute "title" has already been defined
Run Code Online (Sandbox Code Playgroud)
widget_attrributes.xml看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="display" format="string" />
<attr name="lineWidth" format="dimension" />
<attr name="lineColor" format="color|reference" />
<attr name="fillColor" format="color|reference" />
<declare-styleable name="DigitalDisplay">
<attr name="title" format="string" />
<attr name="unit" format="string" />
<attr name="display" />
<attr name="valueFormat" format="string" />
<attr name="showUnitInValue" format="boolean" />
<attr name="showUnitInTitle" format="boolean" />
<attr name="valueIsTime" format="boolean" />
<attr name="titleTxtAppearance" format = "reference" />
<attr name="valueTxtAppearance" format = "reference" />
<attr name="unitTxtAppearance" format = "reference" />
</declare-styleable>
.../...
</resources>
Run Code Online (Sandbox Code Playgroud)
当我使用自己的小部件时,我使用下面的符号:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:droidfa="http://schemas.android.com/apk/res/com.droidfa"
android:layout_width="match_parent"
android:layout_height="match_parent" >
Run Code Online (Sandbox Code Playgroud)
我一定做错了什么,但我无法弄清楚是什么......
任何帮助或提示将不胜感激.
在此先感谢,JM
jmc*_*c34 11
好的,如果有人在这一天读了这篇文章,我唯一可以通过重命名自己的属性来解决这个问题...
| 归档时间: |
|
| 查看次数: |
3596 次 |
| 最近记录: |