当我添加依赖项时:

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

在我的应用程序中,我收到此错误:
Conflict with dependency 'net.bytebuddy:byte-buddy'. Resolved versions for app (0.7.8) and test app (0.6.14) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

我访问过 http://g.co/androidstudio/app-test-app-conflict,它说:



但我不知道这是什么意思。

你能帮助我吗?谢谢。

build.gradle
    ...
     buildTypes {

            all {
                //just build some config fields
            }

            demo.initWith(buildTypes.debug)
            demo {
                //just build some config fields
            }

            devel.initWith(buildTypes.debug)
            devel {
                //just build some config fields
            }

            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.gg
                //just build some config fields
            }
        }

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}

    ...

最佳答案

您可以使用以下方法强制测试中的版本:

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

关于android - Gradle:应用程序和测试应用程序的已解决版本不同,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34650509/

10-11 22:26
查看更多