I installed cordova and create a new project.
But when I use this command to add android platform:
cordova platform add android
I faced the same problem today, none of the answers mentioned above works for me. It turns out to be a permission problem, just simply add a sudo ahead.
sudo
sudo cordova platforms add android
I am using Mac OS by the way