capacitor build for android code example
Example 1: ionic capacitor android
// if you didn't run before
ionic build
// then
npx cap add android
npx cap sync
Example 2: ionic capacitor ios
// if you didn't run before
ionic build
// then
npx cap add ios
Example 3: capacitor.ionicframework.com to apk
ionic capacitor copy android && cd android && ./gradlew assembleDebug && ./gradlew installDebug && cd ..