I installed cordova and create a new project.
But when I use this command to add android platform:
cordova platform add android
Did you copy or clone your project from somewhere else? Normally these errors have to do with incompatibilities between your cordova version and your platform configuration files.
update your cordova to the latest version
npm -g update cordova
Then remove and add the platform again
cordova platform rm android && cordova platform add android