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

Impossible to compile with api 28 #12

Open
baldapps opened this issue Jul 22, 2018 · 2 comments
Open

Impossible to compile with api 28 #12

baldapps opened this issue Jul 22, 2018 · 2 comments

Comments

@baldapps
Copy link

The library is using api 27 as target and it includes support library 27, so if you try to use a project with api 28, gradle complains that you are using two different versions. Please update to api 28.

@JulienFolliot
Copy link

Hi,

Can you try this in your project build.gradle (replace by your target support library version) :

Simple version

configurations.all {
    resolutionStrategy.force "com.android.support:support-v4:27.0.2"
    resolutionStrategy.force "com.android.support:appcompat-v7:27.0.2"
}

Better version (for me)

In your root build.gradle

ext {
    supportAppCompatVersion = '27.0.2'
}

and in your project build.gradle

configurations.all {
    resolutionStrategy.force "com.android.support:support-v4:$rootProject.supportAppCompatVersion"
    resolutionStrategy.force "com.android.support:appcompat-v7:$rootProject.supportAppCompatVersion"
}

and in your dependencies declaration, replace your appCompat declaration by :

implementation "com.android.support:support-v4:$rootProject.supportAppCompatVersion"
implementation "com.android.support:appcompat-v7:$rootProject.supportAppCompatVersion"

@baldapps
Copy link
Author

Forcing a version not compatible with current api level is not really a good idea and it's just a source of bugs and crashes. Please update your dependency.

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

No branches or pull requests

2 participants