目录

ionic 打包apk 常见文件

生成keystore

1
keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore /Users/jovi/android.keystore

使用工具签名

example:

1
perl signer.pl -k ./test.keystore -p1 1234 -a alias -p2 1234 -s ./source_apk -d ./output_apk

[-keystore|-k] : The path of your keystore file [-keypass|-p2] : The password of the alias [-storepass|-p1] : The password of the keystore file [-src_dir|-s] : The source directory of your apk files [-dst_dir|-d] : The destinate output directiory of your signed apk files [-alias|-a] : The alias of the keystore file

打包错误时查看具体原因

1
cd platforms/android
1
gradlew --info build clean