大家好,又见面了,我是你们的朋友全栈君。
在给apk签名的时候会出现如下的问题,如何解决呢?
Exception in thread "main" java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
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.<clinit>(NativeCrypto.java:54)
at org.conscrypt.OpenSSLBIOInputStream.<init>(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)
解决方案:
1,复制 libconscrypt_openjdk_jni.so into 到当前路径下
2,复制 signapk.jar into 到当前路径下
3,然后执行如下命令给apk重新签名java -jar -Djava.library.path=. signapk.jar platform.x509.pem platform.pk8 xxx.apk signed-xxx.apk
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/141766.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...