Gradle: Resolved versions for app and test app differ


When I add the dependency:

compile 'net.bytebuddy:byte-buddy-android:0.7.8'

in my app, I get this error:

Conflict with dependency 'net.bytebuddy:byte-buddy'. Resolved versions for app (0.7.8) and test app (0.6.14) differ. See for details.

I have visited and it says:

Gradle build will fail if the main APK and the test APK use the same library (e.g. Guava) but in different versions.[…] To make the build succeed, just make sure both APKs use the same version

But I don’t know what it means.

Can you help me? Thanks.


     buildTypes {

            all {
                //just build some config fields

            demo {
                //just build some config fields

            devel {
                //just build some config fields

            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), ''
                //just build some config fields

lintOptions {
    checkReleaseBuilds false
    abortOnError false



You can force the version in your test using:

androidTestCompile 'net.bytebuddy:byte-buddy-android:0.7.8'

Answered By – Gabriele Mariotti

Leave a Comment