Proguard Duplicate Zip Entry

匆匆过客 提交于 2019-12-05 01:21:22

The issue is butterknife which is compiled with a higher support version (25.1.0), so you may want to downgrade butterknife or move all support library to 25.1.0

Here I've downgraded butterknife to 8.0.1 :

dependencies {
    compile('com.google.api-client:google-api-client-android:1.22.0') {
        exclude module: 'httpclient'
    }
    compile('com.google.apis:google-api-services-sheets:v4-rev19-1.22.0') {
        exclude module: 'httpclient'
    }

    compile 'com.google.android.gms:play-services-identity:9.2.0'
    compile 'com.google.android.gms:play-services-auth:9.2.0'

    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:percent:23.4.0'

    compile 'com.squareup.okhttp3:okhttp:3.3.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
    compile 'com.squareup.okio:okio:1.8.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'net.sf.biweekly:biweekly:0.4.6'
    compile 'com.github.tibolte:agendacalendarview:1.0.4'
    compile 'com.7heaven.widgets:segmentcontrol:1.14'
    compile 'com.survivingwithandroid:weatherlib:1.6.0'
    compile 'com.survivingwithandroid:weatherlib_okhttpclient:1.6.0'
    compile files('libs/FDxSDKProAndroid.jar')
    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
    testCompile('com.squareup.leakcanary:leakcanary-android-no-op:1.5')

    compile 'com.jakewharton:butterknife:8.0.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
}

Then in your proguard.pro to deal with warning :

 -keep class com.fasterxml.** { *; }
 -dontwarn com.fasterxml.**

 -keep class biweekly.io.json.** { *; }
 -dontwarn biweekly.io.json.**

 -dontwarn java.lang.invoke**

 -dontwarn sun.misc.Unsafe

 -dontwarn okio.**

Note that I've also enabled multidex to build successfully : I've added multiDexEnabled true to defaultConfig

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!