3

In my android project I need commons-codec 1.8 and I would like to exclude the built-in commons-codec version. I also have some maven dependencies and I want them use 1.8 instead of built-in.

Here is the error message, it looks like the built in jar is in /system/framework/ext.jar

java.lang.NoSuchMethodError: No static method encodeHex([BZ)[C in class
 Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of
 'org.apache.commons.codec.binary.Hex' appears in /system/framework/ext.jar)
TheModularMind
  • 2,024
  • 2
  • 22
  • 36

1 Answers1

11

add to your build.gradle file

dependencies {
    compile 'commons-codec:commons-codec:1.8'
}
Toda Raba
  • 614
  • 1
  • 10
  • 25