簡體   English   中英

包含 Google Cloud Client 庫后在 Android Studio 中構建錯誤

[英]Building error in Android Studio after including Google Cloud Client library

在嘗試使用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),我通過刪除它來解決這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM