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

前端 未结 3 1904
余生分开走
余生分开走 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 16:57

    From Proguard manual:

    Warning: can't write resource ... Duplicate zip entry

    Your input jars contain multiple resource files with the same name. ProGuard continues copying the resource files as usual, skipping any files with previously used names. Once more, the warning may be an indication of some problem though, so it's advisable to remove the duplicates. A convenient way to do so is by specifying filters on the input jars. There is no option to switch off these warnings.

    The standard Android build process automatically specifies the input jars for you. There may not be an easy way to filter them to remove these warnings. You could remove the duplicate resource files manually from the input and the libraries.

提交回复
热议问题