Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dependency on commons-codec conflicts with the commons-codec in lower versions of the Android framework. #542

Closed
overcat opened this issue Sep 21, 2023 · 0 comments · Fixed by #543
Labels

Comments

@overcat
Copy link
Member

overcat commented Sep 21, 2023

What version are you using?

0.41.0

What did you do?

We received feedback from user vicm on Discord:

https://discord.com/channels/897514728459468821/1082043640140017664/1154120313408335952

Hi,
I see, like described in v0.41.0, some dependecies updates. Something leads to the android compatibility issues with relative old versions (e.g. try do following on API less than 28 (Android 9)):
AccountConverter.enableMuxed().encode("account")
java.lang.NoSuchMethodError: No static method isEmpty([B)Z in class Lorg/apache/commons/codec/binary/BinaryCodec; or its super classes (declaration of 'org.apache.commons.codec.binary.BinaryCodec' appears in /system/framework/org.apache.http.legacy.boot.jar)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:407)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:451)
at org.stellar.sdk.StrKey.decodeVersionByte(StrKey.java:142)

What did you expect to see?

It cannot run successfully below Android API 28.

What did you see instead?

It run successfully below Android API 28.

diagnosis

The Android framework includes a low version of commons-codec, which does not include the Base32 module, while our library uses the Base32 module. See https://stackoverflow.com/a/29833101

Possible solutions

  • Remove commons-codec from SDK dependencies list
  • Provide shadow jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant