justinludwig / jpgpj

Java Pretty Good Privacy Jig
MIT License
75 stars 20 forks source link

Error While Building #3

Closed umang6891 closed 7 years ago

umang6891 commented 7 years ago

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.

justinludwig commented 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>
umang6891 commented 7 years ago

Thanks for the update.