How to resolve a library conflict (apache commons-codec)

前端 未结 5 1510
盖世英雄少女心
盖世英雄少女心 2020-12-11 03:49

I have a problem with Android libraries.

I would like use the method Hex.encodeHexString(Byte Array) from the library org.apache.commons.codec.binary.Hex (version 1

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 04:38

    Have you added the library to the build path of the project? When you've done that you should be able to call the method from the jar file.

    If it builds OK without adding the library then you may be building against a newer version of android then effectively deploying to an older one, I found out the hard way that String.isEmpty() isn't in 2.1 but when I was writing the code it build OK as I was building against 4.1

    You may need to export the jar with your project (again you can do this as you configure the build path).

    Hope this helps

提交回复
热议问题