How to add Android platform to Ionic project

Run the following commands to add Android platform to your ionic project

  • Install the @capacitor/core package.
npm install @capacitor/core
  • Install capacitor cli:
npm install @capacitor/cli --save-dev
  • Install the capacitor/android package
npm install @capacitor/android
  • Add the ios platform:
npx cap add android

A new folder with name android will be added to your Ionic project: