2017-08-02 65 views
5

Chcę podpisać mój apk, więc wykonywane następujące polecenie:Jak rozwiązać błąd conscrypt_openjdk_jni w błędzie java.library.path?

java -jar signapk.jar platform.x509.pem platform.pk8 app-debug.apk ~/Desktop/test.apk

ale mam następujący błąd:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:25) at org.conscrypt.NativeCrypto.(NativeCrypto.java:54) at org.conscrypt.OpenSSLBIOInputStream.(OpenSSLBIOInputStream.java:34) at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:119) at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:220) at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:216) at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:94) at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:272) at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339) at com.android.signapk.SignApk.readPublicKey(SignApk.java:182) at com.android.signapk.SignApk.main(SignApk.java:1087)

Jak rozwiązać ten problem?

(wersja openjdk "1.8.0_141" OpenJDK Runtime Environment (build 1.8.0_141-8u141-B15-3 ~ 14.04-b15) OpenJDK 64-bitowy serwer VM (build 25.141-B15 tryb mieszany) )

Odpowiedz

4
java -Xmx2048m -Djava.library.path="out/host/linux-x86/lib64" \ 
    -jar out/host/linux-x86/framework/signapk.jar \ 
    -w build/target/product/security/platform.x509.pem \ 
    build/target/product/security/platform.pk8 \ 
    FileNeedSign.apk FileNeedSign_Signed.apk