第一种:Android.mk 先 source ./build/envsetup.sh && lunch userdebug
最终使用以下就不会报错:
java -Djava.library.path="out/host/linux-x86/lib64" -jar out/host/linux-x86/framework/signapk.jar build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 **.apk **-signed.apk
以下是两种错误方式及报错内容
java -Djava.library.path="prebuilts/sdk/tools/linux/lib64" -jar prebuilts/sdk/tools/lib/signapk.jar build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 **.apk **-signed.apk
会报:
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-linux-x86_64, conscrypt_openjdk_jni-linux-x86_64-fedora, conscrypt_openjdk_jni]