Problems with 2 different versions of the v7 library

0

My app is displaying the following error:

AsifIhadbeenusingtwoversionsofthecompatibilitylibrary,at25and27,butI'vealreadyrolledtheentireprojectandIdonotthinkwherethelibrarywouldbedeclared25tochange,

detail:

I'musing:

compileSdkVersion27buildToolsVersion"27.0.2"
targetSdkVersion 27

Thank you.

    
asked by anonymous 21.01.2018 / 16:16

1 answer

1

The error

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

In% w / w you can choose whether to use the dependency entirely or only use part of it.

In your case you are using the gradle version, but another dependency is using the 27.0.2 version of 25.2.0 and therefore the error.

Correction

To fix this error, simply use the com.android.support:appcompat-v7 pendency dependency without the ***** pendence.

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

(as you can not see the other dependencies, you can not 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 dependency management in Gradle, documentation .

    
21.01.2018 / 17:27