JOSE HERRADA
JOSE HERRADA

Reputation: 149

cordova platform add android not working, how can compile using cordova? Ionic project

I'm running this line command

cordova platform add android

To start compiling the app APK, but the following error appears on the command line

enter image description here

I don't understand why the cordova command isn't working, what could it be?

Upvotes: 0

Views: 1253

Answers (1)

JGauthier
JGauthier

Reputation: 271

if its not already done, to run this command first :

ionic cordova prepare android

https://ionicframework.com/docs/cli/commands/cordova-prepare

otherwise, try renaming the android folder, run and the prepare command again. some people experienced the same issue and this work-around worked https://forum.ionicframework.com/t/could-not-install-from-ios-as-it-does-not-contain-a-package-json-file/168462/5

Upvotes: 1

Related Questions