简体   繁体   中英

Can't add Android platform in Cordova project

here is the information shown in my commandline:

$ cordova platform add android
Error during untar for /home/aqib/.cordova/lib/npm_cache/cordova-android/5.2.2/package.tgz: 
Error: EPERM: operation not permitted, utime '/home/aqib/.cordova/lib/npm_cache/cordova-android/5.2.2/package/.npmignore'

Error: Failed to fetch platform android
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: EPERM: operation not permitted, utime '/home/aqib/.cordova/lib/npm_cache/cordova-android/5.2.2/package/.npmignore'

You have to install the platform as Administrator .

If you are using Linux run as:

sudo cordova platform add android

If you are working on windows open the cmd with right click and then choose Run as administrator . After that you install your cordova with:

cordova platform add android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM