eluleci / FlatUI

Android FlatUI Kit
1.67k stars 423 forks source link

Google Play Services 4.4.52 attribute theme error #14

Closed headsvk closed 10 years ago

headsvk commented 10 years ago

Hi, new Google Play Services hit me with an error: Error:Attribute "theme" has already been defined It points to com.google.android.gms\play-services\4.4.52\res\values\wallet_attrs.xml

<!-- Attributes for the WalletFragment &lt;fragment&gt; tag -->
    <declare-styleable name="WalletFragmentOptions">
        <!-- Theme to be used for the Wallet selector -->
        <attr name="theme" format="enum">
            <enum name="holo_dark" value="0"/>
            <enum name="holo_light" value="1"/>
        </attr>
    </declare-styleable>

Is there a way to fix it?

eluleci commented 10 years ago

The only way to fix this is forking the flatui and changing the 'theme' attribute to something different. I am looking for the solutions to avoid this but now there is nothing I can do.

It is not an option to change the attribute name of the original library because there can be conflicts with any attribute with any library. So forking and changing the attribute is the only option until I find a better solution. Sorry

headsvk commented 10 years ago

Well I think it's the same issue as kloon15 reported, library prefix should fix it.

eluleci commented 10 years ago

I tried to add this but I had another problem with the Gradle like resourcePrefix() method not found. Also there is no much information about it. So I'll try to add this and see that it works with every one. Then I'll update the repo.

headsvk commented 10 years ago

Okay, thanks.

gabriel-farache commented 10 years ago

Hi, If you want to use the prefix, you need to use gradle 0.10 (minimum) in your build.gradle. Hope this help to solve this annoying issue :)

headsvk commented 10 years ago

well I got latest gradle and I couldn't make it work with just resourcePrefix 'flatui_' in build.gradle of the library, I had to rename all attributes in the library manually to make it work

aemxn commented 10 years ago

It's my first time confronting with this error. Where is this build.gradle located at?

eluleci commented 10 years ago

fixed with 2.1.0