在尝试使用Google Cloud Storage API时,我添加了以下依赖关系:com.google.apis:google-api-services-storage:v1-rev17-1.19.0但是,我收到以下构建错误:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: javax/annotation/CheckForNull.class
这是我的依赖项列表:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.flipboard:bottomsheet-core:1.5.0'
compile 'com.flipboard:bottomsheet-commons:1.5.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.google.apis:google-api-services-storage:v1-rev17-1.19.0'
}
对此javax / annotation / CheckForNull.class到底应排除什么依赖性?
谢谢。
我在libs目录中有一个不必要的JAR文件(jsr305-1.3.9.jar),只需将其删除即可解决此问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句