当我添加依赖项时:
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,它说:
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
但我不知道这意味着什么.
你能帮助我吗?谢谢.
的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'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。