I have successfully imported BouncyCastle into my Android project and added the javamail for android packages to my project here.
I'm now having an issue when trying to sign a file, BouncyCastle try to access a class called DataFlavor
, located into the java.awt.datatransfer
package.
I've read on some posts that, in my case, the class is located into myjava.awt.datatransfer
, in additional jar of Javamail for android
So I modified the sources of BouncyCastle jar to access this class, but unfortunately this didn't work, now it tells me that it
"cannot convert from ActivationDataFlavor to DataFlavor".
Does anyone knows how can I solve this issue ? Help will be appreciated!
Edit
Here is the complete stacktrace when app crashes
java.lang.NoClassDefFoundError: Failed resolution of: [Ljava/awt/datatransfer/DataFlavor; at org.bouncycastle.mail.smime.handlers.pkcs7_mime.(Unknown Source:16) at java.lang.Class.newInstance(Native Method) at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:609) at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:563) at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:626) at javax.activation.DataHandler.writeTo(DataHandler.java:329) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1692) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:996)