PagerSlidingTabStrip
PagerSlidingTabStrip copied to clipboard
Use newer build tools to prevent crash when using in a project with com.android.tools.build:gradle:3.0.0-beta2
Currently, when this library is used with the newest android gradle plugin (com.android.tools.build:gradle:3.0.0-beta2), the app crashes when the PagerSlidingTabStrip is inflated:
java.lang.UnsupportedOperationException: Can't convert value at index 1 to color: type=0x5 at android.content.res.TypedArray.getColor(TypedArray.java:480) at com.astuetz.PagerSlidingTabStrip.<init>(PagerSlidingTabStrip.java:144) at com.astuetz.PagerSlidingTabStrip.<init>(PagerSlidingTabStrip.java:106)
This is caused by the following bug in the old build tools: https://issuetracker.google.com/issues/64472743
This PR fixes the problem by building the library with newer buildtools
Have the same issue!
I had the same issue. I applied the solution and it worked like a charm. Thanks for the help @ChristophKaser, you saved my monday.
Thanks @ChristophKaser
In the meantime, if switching from 2.3.0 to 3.0.0 of com.android.tools.build:gradle it is also necessary to change maven repository from jcenter() to google().
It seems the author is not actively working on this project right now.
How can I make gradle use a modified version of this lib?
currently compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
You can use jitpack.io:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.ChristophKaser:PagerSlidingTabStrip:d924189a70'
}