MaterialSpinner icon indicating copy to clipboard operation
MaterialSpinner copied to clipboard

Build failed due to attr values error

Open shahimclt opened this issue 7 years ago • 12 comments

I am getting the following error when trying to include the library:

Error:(762) Attribute "ms_errorColor" already defined with incompatible format.
Error:(687) Original attribute defined here.

The first line is pointing to this:

<declare-styleable name="StepperLayout"> ..... <attr format="color|reference" name="ms_errorColor"/>

And the second line to this:

<declare-styleable name="MaterialSpinner"> .... <attr format="color" name="ms_errorColor"/>

shahimclt avatar Sep 30 '17 07:09 shahimclt

OK. seems like there is a conflict with this library: Material Stepper. Both seem to use the ms_errorColor attribute.

So is there any way to resolve this that does not involve forking one of the libs and changing the attribute name?

shahimclt avatar Sep 30 '17 08:09 shahimclt

I've the same problem here! @shahimclt did you solve forking?

jordansilva avatar Oct 23 '17 18:10 jordansilva

@jordansilva I did not fork this but I solved the issue for now by downloading the source into my project and changing this:

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

to this:

<attr name="ms_errorColor" format="color|reference"/>

in res/attrs.xml.

I will try to submit a PR when I get the time.

shahimclt avatar Oct 24 '17 08:10 shahimclt

@ganfra any thoughts on this?

shahimclt avatar Oct 24 '17 08:10 shahimclt

This seems to be a very common issue: see this and this. not sure what the best approach is here.

shahimclt avatar Oct 24 '17 08:10 shahimclt

@ganfra Can we bump this? I would love to not have to include this project as a module!

briananderson1222 avatar Dec 07 '17 05:12 briananderson1222

https://github.com/ganfra/MaterialSpinner/pull/112

briananderson1222 avatar Dec 07 '17 06:12 briananderson1222

Since its not been added to the main library, here is an updated fork implementation 'com.github.interwap:MaterialSpinner:v2.0.1'

https://github.com/interwap/MaterialSpinner/

interwap avatar Sep 24 '18 16:09 interwap

@interwap Unable for me to add your dependency. It is not in maven repo or jcenter

gigaga avatar Feb 05 '19 14:02 gigaga

@gigaga its a Jitpack repo... Forgot to mention that...

interwap avatar Feb 05 '19 14:02 interwap

What was changed? Currently (from the initial lib), I am not able to change color of floating label when this is an error (I'd like to set the color to red)

gigaga avatar Feb 05 '19 15:02 gigaga

@gigaga I had issues with multidex on the other version when used with the Material Stepper. library. So it wouldnt even let gradle build successfully. Hence the need to fix the conflict.

interwap avatar Feb 06 '19 07:02 interwap