通过将 commons-io 编译到我的项目 proguard 不允许创建 apk?
by compiling commons-io to my project proguard doesn't allow to create apk?
我将 Commons-io 包编译到我的 android 项目中。
当我想创建我的项目 apk 文件时,proguard 有问题!
忽略此包的 progaurd 规则是什么?
compile 'org.apache.commons:commons-io:1.3.2'
错误是:
Warning:Exception while processing task java.io.IOException: Can't write [C:\Users***\app\build\intermediates\transforms\proguard\release\jarsf\main.jar] (Can't read [C:\Users***.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-io.3.2\b6dde38349ba9bb5e6ea6320531eae969985dae5\commons-io-1.3.2.jar(;;;;;;**.class)] (Duplicate zip entry [org/a/a/a/a.class == commons-io-1.3.2.jar:org/apache/commons/io/FileUtils.class]))
I had the same issue. In my case I hadn't done a build for a few
months, and found that the dependency compile
'org.apache.commons:commons-io:1.3.2' is no longer valid (though I
guess the jars were still in my local repository).
Once I changed it to compile 'commons-io:commons-io:1.3.2', proGuard
ran fine.
来源:CjS's answer
我将 Commons-io 包编译到我的 android 项目中。 当我想创建我的项目 apk 文件时,proguard 有问题! 忽略此包的 progaurd 规则是什么?
compile 'org.apache.commons:commons-io:1.3.2'
错误是:
Warning:Exception while processing task java.io.IOException: Can't write [C:\Users***\app\build\intermediates\transforms\proguard\release\jarsf\main.jar] (Can't read [C:\Users***.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-io.3.2\b6dde38349ba9bb5e6ea6320531eae969985dae5\commons-io-1.3.2.jar(;;;;;;**.class)] (Duplicate zip entry [org/a/a/a/a.class == commons-io-1.3.2.jar:org/apache/commons/io/FileUtils.class]))
I had the same issue. In my case I hadn't done a build for a few months, and found that the dependency compile 'org.apache.commons:commons-io:1.3.2' is no longer valid (though I guess the jars were still in my local repository).
Once I changed it to compile 'commons-io:commons-io:1.3.2', proGuard ran fine.
来源:CjS's answer