我正在使用离子框架为Android平台生成apk.
运行后ionic build android
,会生成android-debug.apk.如何生成更小更快的非调试apk?
这是我的android发布shell脚本
IFY
clear gulp ionic build --release android jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore "path/to/your/keystore" "platforms/android/build/outputs/apk/android-release-unsigned.apk" "keystore alias" -storepass xxx -keypass xxx /path/to/android-sdk/build-tools/23.0.2/zipalign -v 4 "platforms/android/build/outputs/apk/android-release-unsigned.apk" "android-release.apk" rm "platforms/android/build/outputs/apk/android-release-unsigned.apk"
在cordova 6.2.0中,您可以使用以下命令发布apk.由于离子是cordova的包装物,因此应该可行.
cd cordova/ #change to root cordova or ionic folder platforms/android/cordova/clean #clean if you want cordova build android --release -- --keystore="/path/to/keystore" --storePassword=password --alias=alias_name #password will be prompted if you have any