androidionic-frameworkcapacitordeploying

Run Ionic 5 app on real android device using capacitor


I've recently started working with capacitor using using ionic 5. I've read all the capacitor documentation but I didn't find any guidance that how can I run Ionic 5 app on real android device. Can anyone guide me how can run Ionic 5 app on real android device? Thanks.


Solution

  • Edit:

    Since Capacitor 3 there is a run command

    npx cap run android
    

    It will show you a list of available devices/emulators to choose where you want to run.

    Old answer:

    Capacitor apps are run from Android Studio directly

    If you already have an Ionic project with Capacitor integrated, just run npx cap open to open Android Studio, and with a device plugged, do Run -> Run 'app' or click the green triangle button.