[ERROR] Unable to find command: platform add android

Hi
my ionic info are:

Ionic:

Ionic CLI : 5.4.13 (C:\Users\forma\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.10.0
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 18 other plugins)

Utility:

cordova-res : 0.8.1
native-run : 0.3.0

System:

NodeJS : v12.14.0 (C:\Program Files\nodejs\node.exe)
npm : 6.13.4
OS : Windows 10

When i want to use : ionic platform add android

i have a massege:
[ERROR] Unable to find command: platform add android

Can none help me :slight_smile: New with Ionic :sweat_smile:

Here is the current CLI documentation, in which there is no “platform” command.

@rapropos Okay, what i should to do for fix it? I want to build my apk app but can’t because this command not found.

Read that documentation page and decide which command on it does what you want.

1 Like

Hi @rapropos. I read it a week ago and I am trying to understand this, but I could not overcome this problem so I came to the forum. If you can pinpoint where there is a mistake and I will focus on that paragraph. Currently, I am reading and trying without success.

@rapropos I think I understood my mistakes
Now I used an command: ionic cordova build android

I get the following error message

ng.cmd run app:build

Generating ES5 bundles for differential loading…
An unhandled exception occurred: Call retries were exceeded
See “C:\Users\Rasheed\AppData\Local\Temp\ng-1JKWf8\angular-errors.log” for further details.
[ERROR] An error occurred while running subprocess ng.

    ng.cmd run app:build exited with exit code 127.

Is there anything i must to do?

It sort of depends on what runtime environments you need to support. Many suggestions are in this issue.

1 Like

run cmd
ionic cordova run android --prod
should work …
have a good day :wink:

1 Like

Thanks
Have a good day.

1 Like