Ripple颜色已经定义为Android

时间:2016-02-01 20:26:28

标签: android gradle android-gradle build.gradle

我正在尝试在Android中导入库:

compile 'com.materialcontentoverflow:materialcontentoverflow:1.1.0'

但是当我尝试它时告诉我:

 C:\Users\A\Desktop\Project\app\build\intermediates\exploded-aar\me.drakeet.materialdialog\library\1.2.2\res\values\values.xml

但如果我查看该项目,则rippleColor没有值。这是文件:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/Users/drakeet/AndroidStudioProjects/MaterialDialog/library/src/main/res/values/color.xml -->
<eat-comment/>
<color name="card_background">#ffffff</color>
<color name="card_shadow">#10000000</color>
<color name="lite_blue">#ff359ff2</color>
<color name="window_background">#00000000</color>
<!-- From: file:/Users/drakeet/AndroidStudioProjects/MaterialDialog/library/src/main/res/values/dimens.xml -->
<eat-comment/>
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<!-- From: file:/Users/drakeet/AndroidStudioProjects/MaterialDialog/library/src/main/res/values/strings.xml -->
<eat-comment/>
<string name="action_settings">Settings</string>
<string name="app_name">MaterialDialog</string>
<string name="hello_world">Hello world!</string>

我尝试导入的库具有以下值values.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/home/artur/workspaceAndroidStudio/MaterialContentOverflow/materialcontentoverflow/src/main/res/values/colors.xml -->
<eat-comment/>
<color name="shadow_end_color">@android:color/transparent</color>
<color name="shadow_mid_color">#14000000</color>
<color name="shadow_start_color">#44000000</color>
<declare-styleable name="FloatingActionButton"><attr name="android:background"/><attr name="backgroundTint"/><attr name="backgroundTintMode"/><attr format="color|reference" name="rippleColor"/><attr name="fabSize"><enum name="normal" value="0"/><enum name="mini" value="1"/></attr><attr name="elevation"/><attr format="dimension|reference" name="pressedTranslationZ"/></declare-styleable>
<declare-styleable name="MaterialContentOverflow"><attr format="reference" name="buttonDrawable"/><attr format="reference" name="fabButtonColor"/><attr format="reference" name="contentColor"/><attr format="enum" name="buttonPosition"><enum name="left" value="0"/><enum name="center" value="1"/><enum name="right" value="2"/></attr></declare-styleable>
<!-- From: file:/home/artur/workspaceAndroidStudio/MaterialContentOverflow/materialcontentoverflow/src/main/res/values/dimens.xml -->
<eat-comment/>
<dimen name="fab_content_size">24dp</dimen>
<dimen name="fab_elevation">8dp</dimen>
<dimen name="fab_size_mini">40dp</dimen>
<dimen name="fab_size_normal">56dp</dimen>
<dimen name="fab_translation_z_pressed">6dp</dimen>

我无法解决问题所在?!有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

检查source on github

   <!-- Ripple color for the FAB. -->
    <attr name="rippleColor" format="color|reference" />

此库正在使用rippleColor

由于支持图书馆使用它,因此您无法使用它  您可以克隆库,更改 attr