GithubHelp home page GithubHelp logo

Comments (11)

garretyoder avatar garretyoder commented on August 30, 2024

Is this an actual compile time error that stops compilation or merely a warning? Colorful sets several different values to ensure maximum compatibility with all devices/platforms, some of which not all platforms will support, and throw a warning informing you of this.

Also, post your usage of colorful, such as any style files, initialization code, etc. There is nowhere colorful uses any attr/ values as they are unreliable. Are you using it anywhere?

from colorful.

bmbariah avatar bmbariah commented on August 30, 2024

It stops compilation and is not just a warning. I've only added the implementation line in my gradle file.
Any attempts to add colorSecondary as an attr have failed

from colorful.

garretyoder avatar garretyoder commented on August 30, 2024

Why and where are you using colorsecondary as a attr? Please post where you're using it. I suspect, if you remove the colorful dependency you will still get the same error because it's unrelated to colorful.

from colorful.

bmbariah avatar bmbariah commented on August 30, 2024

If i remove the colorful dependency it compiles successfully. I only tried to add the colorSecondary as an attempt to solve the issue

from colorful.

bmbariah avatar bmbariah commented on August 30, 2024

It compile successfully with release 2.1 but not latest 2.3.3

from colorful.

garretyoder avatar garretyoder commented on August 30, 2024

colorsecondary is a valid style item that colorful sets to keep compatibility with the new material components widgets, however it is not commonly a valid attr that you can use in xml unless you're targeting sdk28.

If you're not targeting sdk28 you should be using colorAccent as your attr to retrieve the color in xml.

I can test this issue tonight, but let me make sure I'm clear on what's happening.

You run into a compile error merely by adding colorful as a dependency. No xml attrs anywhere, no initialization code, no using colorful's themes, etc.

from colorful.

bmbariah avatar bmbariah commented on August 30, 2024

You run into a compile error merely by adding colorful as a dependency. No xml attrs anywhere, no initialization code, no using colorful's themes, etc.

Exactly...just the one line in gradle

from colorful.

garretyoder avatar garretyoder commented on August 30, 2024

I will test this issue tonight on your exact sdk version and get back to you.

However, I suspect this isn't a issue caused by colorful, simply because colorful is extremely simple, it's just a collection of style files. Colorful's stable branch, which you're using, even compiles on sdk 27 and links the same version of appcompat you're using for it's release build. https://github.com/garretyoder/Colorful/blob/master/library/build.gradle

from colorful.

garretyoder avatar garretyoder commented on August 30, 2024

I think I've found the issue, it's neither a issue with Colorful nor your setup, but a change in how AAPT2 handles warnings in certain scenarios. This was a undocumented change a couple months ago. Basically, in certain cases, AAPT2 will throw a error and stop compilation instead of throwing a warning like normal. This is something I can fix with some build tweaks to have it ignore it in these cases, and will publish in a release later today.

from colorful.

garretyoder avatar garretyoder commented on August 30, 2024

I've fixed the issue on my end with some build changes. Please pull down the latest commit and test to see if your issue is fixed.

implementation 'com.github.garretyoder:Colorful:-SNAPSHOT' to use the latest commit.

If this fixes your issue I will push it as a stable release.

from colorful.

bmbariah avatar bmbariah commented on August 30, 2024

It worked. Successfully compiled in my end and everything else works great.

Thanks for all your hard work !

from colorful.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.