Closed umang6891 closed 7 years ago
You can safely ignore this error. One of the classes in the Bouncy Castle library (which handles all the actual crypto for JPGPJ) uses a standard J2SE package (javax.naming.directory
) that's not included in Android. Fortunately, this class (X509LDAPCertStoreSpi
) isn't PGP-related, so the runtime won't try to load it during normal JPGPJ use.
You can suppress this error by adding a lint.xml
file to the root of your Android project with the following:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="InvalidPackage">
<ignore regexp="X509LDAPCertStoreSpi" />
</issue>
</lint>
Thanks for the update.
Lint shows this error when I build the project after adding the library.
../../../../../../.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.54/1acdedeb89f1d950d67b73d481eb7736df65eedb/bcprov-jdk15on-1.54.jar: Invalid package reference in library; not included in Android: javax.naming.directory. Referenced from org.bouncycastle.jce.provider.X509LDAPCertStoreSpi. ../../../../../../.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.54/1acdedeb89f1d950d67b73d481eb7736df65eedb/bcprov-jdk15on-1.54.jar: Invalid package reference in library; not included in Android: javax.naming. Referenced from org.bouncycastle.jce.provider.X509LDAPCertStoreSpi.