Harun Hikmet Marangoz
Harun Hikmet Marangoz

Reputation: 61

'Ionic cordova build android' gives error

I'm publishing the ionic app but i cant build it. When gives this error

i try build project

ionic cordova build --release android

it gives this error

System cannot find the path specified
[ERROR] An error occurred while running subprocess cordova.
    cordova build android --release exited with exit code 1.
    Re-running this command with the --verbose flag may provide more information.

Upvotes: 0

Views: 1019

Answers (4)

Ayyaz Khan
Ayyaz Khan

Reputation: 25

Its not an ionic error.It occurs when there isn't any setting of path in system variables.You have to follow this link. https://forum.ionicframework.com/t/how-do-i-setup-the-environment-to-work-with-ionic-and-cordova/117054/7

Upvotes: 0

Rebai Ahmed
Rebai Ahmed

Reputation: 1600

Ensure to add android platform to your ionic project

 -ionic cordova platform add android 
 - ionic cordova build android --prod --release

Upvotes: 1

Mr Strange
Mr Strange

Reputation: 676

Ensure that you have ran cordova prepare android it could be that the android platform is missing.

Upvotes: 0

Oscar Bout
Oscar Bout

Reputation: 680

  • Did you install Android Studio.
  • Did you do npm install cordova -g
  • Did you do npm install ionic -g

Also make sure you did all this: https://ionicframework.com/docs/installation/android

(Especially the correct SDK is essential)

Upvotes: 0

Related Questions