【问题标题】:How to fix error duplicate entry: com/coremedia/iso/AbstractBoxParser$1.class?如何修复错误重复条目:com/coremedia/iso/AbstractBoxParser$1.class?
【发布时间】:2017-05-31 04:32:38
【问题描述】:

将 isoparser-1.0.6.jar 添加到 lib 文件夹后,出现类似这样的错误

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/coremedia/iso/AbstractBoxParser$1.class

这是我的毕业作品:

dependencies {
    compile 'com.android.support:multidex:1.0.1'
    testCompile 'junit:junit:4.12'
    compile files('libs/vdopialwsdk.jar')
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile files('libs/httpmime-4.4-beta1.jar')
    compile files('libs/httpcore-4.4.jar')
    compile files('libs/isoparser-1.0.6.jar')
    compile files('libs/android-websockets-master.jar')
    compile files('libs/zcsprinterV.jar')
    compile project(':library')
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:gridlayout-v7:23.3.0'
    compile 'com.android.support:cardview-v7:23.3.0'
    compile 'com.android.support:palette-v7:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.3.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.1'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.github.quentin7b:android-location-tracker:3.2'
    compile group: 'org.igniterealtime.smack', name: 'smack-resolver-minidns', version: '4.1.7'
    compile group: 'org.igniterealtime.smack', name: 'smack-extensions', version: '4.1.7'
    compile group: 'org.igniterealtime.smack', name: 'smack-tcp', version: '4.1.7'
    compile group: 'org.igniterealtime.smack', name: 'smack-legacy', version: '4.1.7'
    compile group: 'org.igniterealtime.smack', name: 'smack-sasl-provided', version: '4.1.7'
    compile group: 'org.igniterealtime.smack', name: 'smack-android', version: '4.1.7'
    compile "org.igniterealtime.smack:smack-bosh:4.1.7"
    compile 'com.rockerhieu.emojicon:library:1.3.1'
    compile 'com.soundcloud.android:android-crop:1.0.0@aar'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'com.github.clans:fab:1.6.1'
    compile 'com.android.support:customtabs:23.1.0'
    compile 'com.github.ozodrukh:CircularReveal:1.1.0'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.github.PhilJay:MPAndroidChart:v2.2.0'
    compile 'com.newrelic.agent.android:android-agent:5.+'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.android.support:support-v4:23.3.0'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:palette-v7:23.1.0'
    compile 'org.jetbrains:annotations:13.0'
    compile 'jp.wasabeef:glide-transformations:1.2.1'
    compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
    compile 'com.joooonho:selectableroundedimageview:1.0.1'
    compile 'de.greenrobot:androidsvg:1.2.2-beta-1-tweaked-2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
    compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'com.github.aakira:expandable-layout:1.6.0@aar'
    compile 'jp.wasabeef:picasso-transformations:2.1.0'
    compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
    compile 'com.github.ybq:Endless-RecyclerView:1.0.3'
    compile 'life.knowledge4:k4l-video-trimmer:1.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'org.aspectj:aspectjrt:1.8.5'

}

那么,如何解决呢? 最好的问候..

【问题讨论】:

  • 现在我知道问题所在了。问题是因为有 2 个库 isoparser-1.0.6.jar 和 life.knowledge4:k4l-video-trimmer:1.0。当我删除那个时,项目运行良好
  • 但是如果还需要同时使用这两个库怎么解决呢?
  • 你解决了这个问题吗?

标签: android video video-compression android-mediacodec


【解决方案1】:

经过长时间的头疼后,我终于解决了这个问题。正如你提到的原因是isoparser。所以请将此添加到您的 build.gradle(Module:app)

compile('life.knowledge4:k4l-video-trimmer:1.1.3-SNAPSHOT') {
        exclude  group: 'com.googlecode.mp4parser', module: 'isoparser'
    }

问题解决了!快乐编码:)

【讨论】:

  • 在 build.gradle 中添加后,点击保存按钮后应用程序崩溃。日志显示“解析失败:Lcom/googlecode/mp4parser/FileDataSourceViaHeapImpl;”
  • 在 cmets.page 中有一个解释。可以试试吗?
  • 感谢您的回复。我能够解决这个问题。可能的解决方案已发布here,以防有人需要。
  • 别忘了带括号。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-30
相关资源
最近更新 更多