I'm trying to add android platform to an Ionic (Angular) project.
ionic capacitor add android
It recognizes ionic capacitor add and requests me to select a platform.
? What platform would you like to add? (Use arrow keys)
> android
ios
But as soon as I select the android platform I get this error.
? What platform would you like to add? android
[ERROR] Error while getting Capacitor CLI version.
'capacitor' is not recognized as an internal or external command,
operable program or batch file.
What is the problem and what do I do? Any help is appreciated. Thank you.
Are you sure that you have installed the capacitor?
If not, you can add it using:
npm install @capacitor/core
npm install @capacitor/cli --save-dev
npx cap init
https://capacitorjs.com/docs/getting-started
Just run:
npm install @capacitor/core @capacitor/cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With