4
votes

I am building an app using ionic framework. when I execute the command 'ionic build android' it is showing the following message.

C:\Windows\System32\todo>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Windows\System32\todo\hooks\after_prepare\010_add_platform_class.js C:\Windows\System32\todo
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk\
JAVA_HOME=C:\Program Files\java\jdk1.8.0_66

Error: spawn cmd ENOENT

I am running it on a windows 7 system using node.js command prompt

I have googled, but couldn't find any helpful solution. Plese help. Thanks in advance

3
Probably this can help you: stackoverflow.com/questions/28624686/… - pleft

3 Answers

0
votes

This issue may be due to your are not set current path of npm(C:\Users\\AppData\Roaming\npm) in environment variable.

0
votes

On some systems, it was the problem of access:

Android Studio 3.0 removes the execute permission from Gradle, breaking the build

you can change the permissions and check the result!

0
votes

The problem may come from windows services. Windows child process services not running properly. In windows, OS => Go to System Config and enable all services and restart the computer. For more details check here.