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

前端 未结 5 1493
盖世英雄少女心
盖世英雄少女心 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:37

    This is due to a namespace collision resulting from and old (1.2) version of Commons Codec that comes packaged with Android colliding with your newer version. While shading is a good workaround, I don't think it is a sustainable solution in the long run. This is a systemic problem that can arise with any open source library that is packaged in Android. I've submitted an issue to Google. If you agree, I encourage you to "star" it so that it gets the attention it needs. Here's the link - https://code.google.com/p/android/issues/detail?id=160578

提交回复
热议问题