-1

I compile Commons-io package to my android project. when I want to create my project apk file it has problem with proguard! what's the progaurd-rule for ignoring this package?

compile 'org.apache.commons:commons-io:1.3.2'

error is:

Warning:Exception while processing task java.io.IOException: Can't write [C:\Users***\app\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar] (Can't read [C:\Users***.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-io\1.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]))

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mostafa
  • 95
  • 1
  • 10
  • Possible duplicate of [Duplicate Zip Entry after Gradle Plugin v0.13.1](https://stackoverflow.com/questions/26059838/duplicate-zip-entry-after-gradle-plugin-v0-13-1) – FelixSFD Aug 21 '17 at 17:24

1 Answers1

0

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.

Source: CjS's answer

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Mostafa
  • 95
  • 1
  • 10