アプリ/ build.gradleはアンドロイドAPKエラーを構築するために失敗しました:持つZipException:エントリを複製:ORG/ObjectWebの/ ASM/AnnotationVisitor.class
は以前、この同じプロジェクトは、Androidスタジオ1.5で正常に動作しますが、アンドロイドスタジオを更新した後、 2.1.1 apkファイルを作成できませんでした。エラーメッセージ:エラー:タスク ':app:transformClassesWithJarMergingForRelease'の実行に失敗しました。
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/objectweb/asm/AnnotationVisitor.class
し、エラーをリリースAPKを構築しようとしているの包みです:エラー:実行は、タスクに失敗しました「:アプリ:transformClassesWithJarMergingForRelease」。
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/objectweb/asm/commons/AdviceAdapter.class
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
// generatedDensities = []
applicationId "com.view9.lacuna"
minSdkVersion 15
targetSdkVersion 23
versionCode 3
versionName "3.0"
multiDexEnabled true
signingConfig signingConfigs.newSigningConfig
}
dexOptions {
javaMaxHeapSize "4g"
jumboMode = true
incremental true
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.newSigningConfig
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/BCKEY.DSA'
exclude 'AUTHORS'
exclude 'META-INF/BCKEY.SF'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
// set to true to turn off analysis progress reporting by lint
quiet false
// if true, stop the gradle build if errors are found
abortOnError true
// if true, only report errors
ignoreWarnings false
// turn off checking the given issue id's
disable 'TypographyFractions', 'TypographyQuotes'
// if true, generate a text report of issues (false by default)
textReport true
}
productFlavors {
}
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.tools.build:gradle:2.0.0'
compile('com.android.support:appcompat-v7:23.0.0') {
exclude module: 'support-v4'
}
compile 'com.google.android.gms:play-services:9.0.2'
compile 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'fr.baloomba:viewpagerindicator:2.4.2'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.github.clans:fab:1.5.5'
compile 'com.github.jorgecastilloprz:fabprogresscircle:[email protected]'
compile 'commons-validator:commons-validator:1.4.0'
compile 'it.neokree:MaterialTabs:0.11'
compile 'se.emilsjolander:StickyScrollViewItems:1.1.0'
compile('org.apache.httpcomponents:httpmime:4.4.1') {
exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile('com.github.afollestad.material-dialogs:core:[email protected]') {
transitive = true
}
compile 'com.squareup:otto:1.3.5'
compile 'com.android.support:multidex:1.0.1'
}
私の場合は、新しいコードでプロジェクトを再作成し、ライブラリを賢明かつ慎重に実装することで、この問題を解決しました。 – jazzbpn