Ionic Android Signing and Build

This post explains how to sign and build an Ionic Android APK.

May 30, 2017 · 1 min read · 79 Words · -Views -Comments · Programming
Mobile Development Android 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

    Add platform

    ionic cordova platform add android 
    

    Create keystore

    keytool -genkey -v -keystore he-release.keystore -alias he -keyalg RSA -keysize 2048 -validity 10000
    

    Create signing config

    Create release-signing.properties under platforms/android:

    key.store=<YOUR_KEYSTORE>.keystore
    key.store.password=<YOUR_KEYSTORE password>
    key.alias=<YOUR_ALIAS>
    key.alias.password=<YOUR_ALIAS password>
    

    Build command

    ionic cordova build android --prod --release You will see android-release.apk under /platforms/android/build/outputs/apk.

    cordova-build-android

    You can also sign the APK manually from the command line, but it is more cumbersome. I recommend the automated signing above.

    Reference: Ionic 2: Building A Release Android APK

    Authors
    Developer, digital product enthusiast, tinkerer, sharer, open source lover