yucel
yucel

Reputation: 385

build error, mixing versions in build gradle

Yesterday, my app was successfully compiling. Today, I get a lot of errors and can't fix.

Here, some friends said that, "already answered" the suggested solution is using exact same version on gradle, but in my graddle, they are already same?

****my graddle****

 compileSdkVersion 26
    minSdkVersion 17
    targetSdkVersion 26
    buildToolsVersion '27.0.3'*

dependencies are in picture for example I have implemented exifinterface:26.0.1 but still it is warning me that i am using exifinterface:27.0.1

enter image description here

Upvotes: 0

Views: 59

Answers (2)

Jacob Celestine
Jacob Celestine

Reputation: 1789

Ever since I added this code to my gradle file I haven't encountered this problem, try:

// use default version for all support repositories
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion 'PUT_THE_VERSION_YOU_WANT' //26.0.1
            }
        }
    }
}

You might have to add multiDexEnabled true insinde android.

Upvotes: 1

Diwakar Singh
Diwakar Singh

Reputation: 287

try after removing

buildToolsVersion '27.0.3'*

Upvotes: 0

Related Questions