【问题标题】:I have two attr in appcompat_v7 and FloatingButtonAction我在 appcompat_v7 和 FloatingButtonAction 中有两个 attr
【发布时间】:2015-09-22 19:41:02
【问题描述】:

我的项目包含这两个库,但由于某种原因,当我想在我的设备上运行它时出现错误:

错误如下:

workspace_desarrollo\Librerias\FloatingActionButton\res\values\attrs.xml:6: error: Attribute "color" has already been defined

查看两个库,发现都定义了。我所做的是重命名 FAB 库,内容如下:

<attr name="colortem" format="color"/>

一切正常,但是当您运行 APP 时,按钮显示为白色背景。有 3 个按钮使用并放置三个白色背景。

以前我没有这个问题,但我不得不更换电脑,当你导入新的工作区项目时开始约会这个错误。

appcompat_v7 这个在:target=android-21

FloatingActionButton 这个在: target=android-19 android.library=true android.library.reference.1=../nineoldandroids

我的项目在: target=android-21 android.library.reference.1=../../Librerias/FloatingActionButton android.library.reference.2=../../Librerias/appcompat android.library.reference.3=../../Librerias/google-play-services_lib

我希望你能帮助我。

谢谢

PD:我正在考虑开始开发 android studio,但我并不完全相信

【问题讨论】:

    标签: android attr android-appcompat floating-action-button


    【解决方案1】:

    删除colortem 属性定义,将使用另一个。否则,您还必须将 FAB 库中的所有 R.attr.color 引用更改为 R.attr.colortem

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-21
      • 2015-02-12
      • 2014-11-27
      • 2020-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-24
      相关资源
      最近更新 更多