Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use newer build tools to prevent crash when using in a project with com.android.tools.build:gradle:3.0.0-beta2 #312

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ChristophKaser
Copy link

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

@vovander
Copy link

Have the same issue!

rogerioit added a commit to rogerioit/PagerSlidingTabStrip that referenced this pull request Oct 30, 2017
@rogerioit
Copy link

I had the same issue.
I applied the solution and it worked like a charm.
Thanks for the help @ChristophKaser, you saved my monday.

@hgoebl
Copy link

hgoebl commented Nov 5, 2017

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().

@jiangbodev
Copy link

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'

@ChristophKaser
Copy link
Author

You can use jitpack.io:

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.ChristophKaser:PagerSlidingTabStrip:d924189a70'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants