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

Android 7 - Base64 NoClassDefFoundError #42

Open
TobiasReich opened this issue Jan 18, 2022 · 1 comment
Open

Android 7 - Base64 NoClassDefFoundError #42

TobiasReich opened this issue Jan 18, 2022 · 1 comment

Comments

@TobiasReich
Copy link

I guess that is an issue with the Java version not being as modern as it should but when I try to use it in my Android App (for Android 7, API Level 24) the app crashes.

The call:

JWT.getDecoder().decode(token, verifier)

is trying the to execute the following line:

Header header = Mapper.deserialize(base64Decode(parts[0]), Header.class);

Which fails because the base64 decoder is not fund. On newer Android Versions this works so I assume the library is just not compatible. Any specifications regarding that? I couldn't find anything. Or am I just doing it wrong?

@TobiasReich
Copy link
Author

TobiasReich commented Jan 19, 2022

Just had a look, the Base64 class is available from Android API 26

https://developer.android.com/reference/java/util/Base64

maybe it might come handy to state this in the info so others like me can see it quickly.

Thanks!

mooreds added a commit that referenced this issue Jan 19, 2022
Addresses issues raised here: #42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant