hyperlog-android icon indicating copy to clipboard operation
hyperlog-android copied to clipboard

Impossible to compile with api 28

Open baldapps opened this issue 7 years ago • 2 comments

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.

baldapps avatar Jul 22 '18 07:07 baldapps

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"

JulienFolliot avatar Jul 25 '18 14:07 JulienFolliot

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.

baldapps avatar Jul 25 '18 15:07 baldapps