Skip to content Skip to sidebar Skip to footer

Using Multiple Library With Different Sdk Version In Android Studio

There are several questions but no relevant answer yet. In my android studio project, I use several libraries with a different version. Now I facing error to run the project. I hav

Solution 1:

You have to set the config for all project in your build.gradle file

subprojects {
afterEvaluate {
    project -> if (project.hasProperty("android")) {
        android {
            compileSdkVersion 28
            buildToolsVersion '28.0.0'
        }
    }
}

}

then in your apps build.gradle file replace config for all other lib

 configurations.all {
    resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'com.android.support') {
            details.useVersion "28.0.0"
        }
    }
}

Post a Comment for "Using Multiple Library With Different Sdk Version In Android Studio"