Linux : add android platform to cordova

▼魔方 西西 提交于 2020-01-04 05:09:06

问题


When I add android platform to my project by issuing the command:

cordova platform add android

I get the following error :

Unable to fetch platform android: Error: EACCES, mkdir '/home/mo3tssem/tmp/npm-13061-R9BWhlB2'

回答1:


Okay, so your /home/ubuntu/tmp has wrong permissions. It happened because you did sudo npm install in the past, and npm doesn't handle this well enough.

Run sudo chown ubuntu /home/ubuntu/tmp -Rv to fix this issue, or just delete that folder.




回答2:


run this first:

ln -s /tmp $HOME/tmp


来源:https://stackoverflow.com/questions/26335523/linux-add-android-platform-to-cordova

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!