在将app重签名为系统应用时,报这样的错:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSLBIOInputStream.java:34)
at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:129)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:226)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:222)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:100)
at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:278)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at com.android.signapk.SignApk.readPublicKey(SignApk.java:184)
at com.android.signapk.SignApk.main(SignApk.java:1007)
Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [conscrypt_openjdk_jni-windows-x86_64, conscrypt_openjdk_jni]
at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:176)
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:49)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:53)
... 9 more
找了网上很多方法,有一些说JDK版本高了,降回1.8版本;
也有说这两个库缺少,需要向厂商要:conscrypt_openjdk_jni-windows-x86_64,conscrypt_openjdk_jni
但是依旧无法解决。。。。
后来也怀疑过Windows系统等问题,但都无法解决,后来在外国网站看到了一些方法,就是有可能signapk.jar有可能损坏(也可能不是,但这个jar文件无法打开,所以就报错了)
然后又是一通查找,在一个网站上找到了另一个2kb的signapk.jar包,替换后居然奇迹般好了。。。。
signapk.jar包的工具网站 :http://www.top139.com/AndroidTools.html
替换后重新打包,大功告成~~~
所以如果试了各和办法都无法解决的话,可以试试替换signapk.jar文件试试