Cordova error building - EPERM, operation not permitted

Another possibility that has not been mentioned explicitly is that if your version control system marks files as read-only when you check them in, then this will cause EPERM errors during your build. You will have to work around this by having a pre-build event or hook (depending on your development environment) to remove this attribute from the files in question after they are copied to the platform specific location.


I had the same problem. This fixed the issue:

sudo chown -R yourUserName foldername

Start Menu -> search "cmd" -> right click "cmd.exe" and "Run as administrator"

Fixed the issue for me.


Re-install android as a platform, should re-create any folders that had bad permissions

cordova platform remove android

cordova platform add android