I am trying to build an android APK file for my project
C:\myApp>cordova build android
cp: copyFileSync: could not write to dest file (code=EPERM):C:\myApp\platforms\android\res\xml\config.xml
Error: EPERM, operation not permitted 'C:\myApp\platforms\android\res\xml\config.xml'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
I used windows 7 64 Bit. What could be the reason?
My files by the way are versioned by subversion and I am not sure if that is the case.
Anyone encountered this one?
Re-install android as a platform, should re-create any folders that had bad permissions
cordova platform remove android
cordova platform add android
Try closing your code editor(ex: VS code)
and run/build again.
I know this is a strange fix but this solution worked for me.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With