Problems with 2 different versions of v7 library

Asked

Viewed 220 times

0

My app is presenting the following error:

inserir a descrição da imagem aqui

as if I had used two versions of the compatibility library, the 25 and the 27, however I already reviewed the whole project and I can’t find where the 25 library would be declared for me to change, someone can help me

detail:

I’m using:

compileSdkVersion 27
buildToolsVersion "27.0.2"
targetSdkVersion 27

Thank you.

1 answer

1


The mistake

These conflicts happen when a library uses the same dependency, but with different versions.

In the gradle you can choose whether to use the full dependency or use only part of it.

In your case you are using the version 27.0.2, but another dependency is using the version 25.2.0 of com.android.support:appcompat-v7 and therefore the mistake.

Correction

To correct this error, just use the dependency ***** without dependence on appcompat-v7.

1. Identify which dependency is causing the error. As you have few just remove until the error disappears.

(as you can’t see the other dependencies, there’s no way I can tell which one is causing conflict)

2. After identifying the dependency that is causing conflict, just use the example below:

compile('dependência-que-está-causando-conflito') {
    exclude group: 'com.android.support'
}

For more information on Gradle dependency management, see documentation.

  • Right answer, and this serves for recyclerview and Support-V4 also :D congratulations Valdeir

  • Thank you. Your answer solved this problem, but I’m having problems with the blessed God of God, if you can take a look, I’d appreciate it. posted here: https://answall.com/questions/273770/errorexecution-failed-for-task-apptransformclasseswithdexforrelease

Browser other questions tagged

You are not signed in. Login or sign up in order to post.