Comments (11)
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.
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.
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.
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.
It compile successfully with release 2.1 but not latest 2.3.3
from colorful.
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.
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.
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.
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.
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.
It worked. Successfully compiled in my end and everything else works great.
Thanks for all your hard work !
from colorful.
Related Issues (20)
- Not working after app restart HOT 4
- Use custom color HOT 11
- Load style resources by name not by id
- "setPrimaryColor" and "setCustomThemeOverride" conflict HOT 12
- Disabled override how to use light/dark theme HOT 1
- Request to add color HOT 3
- Use THEME_MATERIAL appear error log HOT 10
- Colorful has error when start strict mode HOT 7
- Some times primaryColor and accentColor are not used HOT 9
- Sample code for use without kotlin HOT 5
- Does Proguard settings mentioned in document?
- Material Drawer Theming Support? HOT 3
- Migrate to AndroidX HOT 1
- How to customize views in theme?
- ThemeEditor public apply method needs null check
- startSupportActionMode works not propertly with Colorful
- ERROR: Failed to resolve: com.github.garretyoder:Colorful:2.3.4 HOT 1
- R styles not found on API 19 HOT 1
- App bar and Statusbar need same color HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorful.