Resolved Versions for App (22.0.0) and Test App (21.0.3) Differ

Resolved versions for app (22.0.0) and test app (21.0.3) differ

Step #1 when dealing with this sort of thing is to get comfortable with command-line Gradle.

Step #2 is to run the Gradle dependencies report (e.g., gradle -q app:dependencies from the project root). This will provide the ASCII tree as shown in the update to the question, and it should help you identify what is asking for the conflicting artifact versions.

Step #3 is to decide what needs replacing. You elected to replace just the conflict (support-annotations). Personally, I would have gone with the root of the wrong-version tree (recyclerview-v7), though for all I know that might not be the best course of action in this case.

Step #4 is to add the exclude directive to block what you chose in Step #3:

androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.0') {
exclude module: 'support-annotations'
}

Step #5 is to test the heck out of this change. What you are doing is saying that espresso-contrib has to deal with the 22.0.0 edition of support-annotations. That may work. That may not. It depends on the backwards compatibility of the conflict. In this case, support-annotations should be pretty good about it.

Step #6 is to consume the beverage of your choice, one appropriate for your locale and time of day.

Resolved versions for app (26.1.0) and test app (27.1.1) differ

Recently I was getting this error again....I just go to build->rebuild project and it works everytime for me.

where is this Resolved versions for app (25.4.0) from?

This is because the library with:

compile 'com.zone.android.data:account:1.0.0'

is already contained a support media-compat in it. So you need to exclude the support library from it and use your project support library. You can achieve it by using something like:

compile ('com.zone.android.data:account:1.0.0') {
exclude group: 'com.android.support', module: 'support-media-compat' // or support-v4
}

Please be aware that probably the library needs 25.4.0 support library because the specific API methods which aren't in the previous support library. So, you need to test it thoroughly.

Android Espresso Framework Resolved versions for app (25.3.1) and test app (23.1.1) Error

Problem is that espresso uses older versions of support libraries than you are. Since you already have then in your project, exclude them from espresso.
So, in your build.gradle file, you should replace:

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'

with:

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

If you have more conflicts, try excluding more support modules (like appcompat, design etc).



Related Topics



Leave a reply



Submit