Android Proguard warning: can't write resource (Duplicate zip entry)

前端 未结 3 1905
余生分开走
余生分开走 2021-02-12 16:24

I enabled proguard and got:

Warning:can\'t write resource [META-INF/LICENSE.txt] (Duplicate zip entry [commons-io-2.4.jar:META-INF/LICENSE.txt])
Warning:can\'t w         


        
3条回答
  •  一生所求
    2021-02-12 17:15

    You are using a library with duplicate files, is a bug in gradle, for solve use this in your project build.gradle

    android {
        packagingOptions {
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
            exclude '.readme'
        }
    }
    

提交回复
热议问题