-
Notifications
You must be signed in to change notification settings - Fork 101
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
java.lang.ClassNotFoundException: Didn't find class "java.util.Base64" #690
Comments
The version of Android meets requirements per https://eclipse-ee4j.github.io/angus-mail/Android
Per the Base64 API this class was added in JDK 8. However, per https://developer.android.com/reference/java/util/Base64:
For JakartaMail, I think we'll need to review what the minimum version of Android should be supported. If we require API 26 then this ticket will just be closed. Looking at #554 it seems that this ticket should be closed and a new linked ticket should be created to update the documentation. For AngusMail, I think we could look at switching to use MimeUtility.encode with ByteArrayOutputStream or BASE64EncoderStream.encode(user.getBytes(StandardCharsets.UTF_8)) to replace the use of Base64. If I recall correctly there are some differences in how some characters are handled. |
Per Meet Google Play's target API level requirement:
[snip]
Per Which Java APIs can I use in my Java or Kotlin source code? the API level 32 and API level 33 are versions that support Java 11 source syntax. API level 34 supports Java 17 source syntax.
The Android API Levels site shows the usage of devices. Given that information we should close this ticket as will not fix and create new ticket to move the minimum API version for JakartaMail and Angus Mail to API 33 as that would allow us to stop building for JDK 8. Moving to that API version 26 or greater will give access to @lukasj What are your thoughts? |
@jmehrens I'm for jumping to API 33+/SE 11 as a base |
Closed as won't fix because Android 7, API 23 is no longer supported. |
Describe the bug
when using android 7, API 23, got this error
dependencies
implementation 'org.eclipse.angus:jakarta.mail:2.0.1'
implementation 'org.eclipse.angus:angus-activation:2.0.1'
implementation 'jakarta.activation:jakarta.activation-api:2.1.2'
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/Base64;
at org.eclipse.angus.mail.smtp.SMTPTransport$LoginAuthenticator.doAuth(SMTPTransport.java:1010)
at org.eclipse.angus.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:955)
at org.eclipse.angus.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:889)
at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:793)
The text was updated successfully, but these errors were encountered: