Reputation: 23
I just installed the new nodejs and cordova but cannot able to add android platform
Installed platforms:
Available platforms:
android ~7.1.1
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~6.0.0
here the error i am getting
Using cordova-fetch for cordova-android@~7.1.1
Failed to fetch platform cordova-android@~7.1.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code ENOENT
npm -version 6.4.1
cordova -version 8.1.2 ([email protected])
Upvotes: 1
Views: 1852
Reputation: 23
If you are in Windows usually this kind of error happens when you don't have all the paths required in your system environment path variable . Especially the path variables given bellow.
Please paste this line on your system environment Path variable:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Windows\System32;
Then close the current cmd and open a new cmd
Upvotes: 1