Ionic build android capacitor code example
Example 1: ionic capacitor v3 add android
npm install @capacitor/android
npx cap add android
npx cap run android
Example 2: ionic capacitor android
// if you didn't run before
ionic build
// then
npx cap add android
npx cap sync
Example 3: ionic 5 capacitor build apk with android studio
npx cap copy android
npx cap open android
Example 4: ionic capacitor build android apk command
ionic capacitor build android
// Once Android Studio launches
// click on Build -- >Build Bundle /Apk
// Then your apk will be at: android/app/build/outputs/apk/debug/app-debug.apk
Example 5: start ionic 5 capacitor app
ionic start [appName] [appType] --capacitor
e.g. ionic start myApp blank --capacitor
Example 6: how to add capacitor in ionic
ionic start myApp tabs --capacitor
cd myApp