The full verification error is:
Caused by: java.lang.VerifyError: Verifier rejected class com.sun.mail.handlers.handler_base:
java.awt.datatransfer.DataFlavor[] com.sun.mail.handlers.handler_base.getTransferDataFlavors()
failed to verify: java.awt.datatransfer.DataFlavor[]
com.sun.mail.handlers.handler_base.getTransferDataFlavors(): [0x4] can't resolve returned type
'Unresolved Reference: java.awt.datatransfer.DataFlavor[]' or 'Reference:
javax.activation.ActivationDataFlavor[]' (declaration of 'com.sun.mail.handlers.handler_base' appears
in /data/app/~~RLNZ6uodnEsYCb6GewenIg==/com.example.testjavamail-
YKeE7WfbGlx0yA3z6ZNvGA==/base.apk)
This is WAI. In SDK 30, we've added a check to ensure the returned type is resolved. java.awt.* and
javax.activation.* aren't APIs from Android, so unless you put them in your app, it's expected that they
don't resolve. And even though the method at fault may never be executed, in SDK30 we've made
things more strict on the return type for correctness.
If indeed you don't define java.awt.datatransfer.DataFlavor and/or
javax.activation.ActivationDataFlavor in your app, I suggest you just remove the method referencing
those classes. It is likely dead code.