I am trying to create an Android project with Cordova, however i am getting an ENOENT error although i followed the tutorial step by step very carefully, this is getting me
If you are sure of yours paths try to type android in cmd if it says: 'xcopy' was not recognized.
then add to your path:
%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;
In certain cases, don't forget to reboot the PC.
Try to follow these steps:
Make sure that if you created PATH as a system variable, you should run Command Prompt as administrator.
I created PATH as a user variable, and would get the same error when tryin to run as administrator.
I had this exact same error days ago with cordova version 3.1.Go to directory path C:\Program Files\nodejs and then install your cordova.Sometimes cordova cannot connect to the right path of npm due to conflict.Then create your project and add platform android.Hope this solution works for you too.
In my case problem was user variable TEMP. There were two folders.
Not working TEMP -path:
%USERPROFILE%\AppData\Local\Temp;C:\php
Working TEMP -path:
%USERPROFILE%\AppData\Local\Temp
After this everything worked fine!
I had a similar issue when trying ionic platform add android.
result;
partial build with ENOENT error titled "cordova-plugin-console" on the same child process as mentioned above superspawn.js
After trying reinstalling etc.. without resolution I changed my path variables around. ANDROID_HOME was placed in user variables --
C:\Users\XXXXXX\AppData\Local\Android\android-sdk
PATH was updated in the system variables to remove previous entries for SDK and added at the end;
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Windows\System32;C:\Users\XXXXXX\Node\;C:\Users\XXXXX\AppData\Local\Android\android-sdk\tools;C:\Users\XXXXXX\AppData\Local\Android\android-sdk\platform-tools;
Restart pc, tested with new app
ionic start <new folder> tabs
cd to the folder created,
test it runs with
ionic serve --lab
exit with q then try to add the platform.
ionic platform add android
now it works..
Please note********* now when i run 'android' in the CMD from my user dir...
C:\Users\XXXXX>android
i do not see the xcopy not found displayed to my screen. android SDK manager always loaded before and still now after i changed my paths.
Hope this helps p.s I run these cmds from my user acc which is not the admin acc as i never log in as or use my pc as an administrator.