这是我第一次使用cordova和phonegap.我试过这两个,但没有一个能为我工作.对于phonegap最新文档,您无需安装一些已捆绑的插件.与设备一样,联系人,网络信息和 Android配置权限已经提供给他们
我与cordova 3.5(最新)的问题是当我安装插件并尝试构建或运行我有权限问题,如果我给插件目录一个权限,然后这些错误弹出
rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/cordova.js rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/cordova.js rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/cordova_plugins.js rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/cordova.js rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/cordova_plugins.js rm: could not remove file (code EACCES): /home/bright/helloTest/platforms/android/assets/www/css/index.css
如果使用root权限运行或构建,我会收到此错误:
Running command: /home/bright/helloTest/platforms/android/cordova/run ERROR: Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path. Error: /home/bright/helloTest/platforms/android/cordova/run: Command failed with exit code 2 at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova- lib/src/cordova/superspawn.js:135:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:753:16) at Process.ChildProcess._handle.onexit (child_process.js:820:5)
但是当没有安装插件时,它运行得很好.
我正在使用ubuntu 12.04.
为什么phonegap(最新)插件不起作用,我的意思是默认的API(联系人,地理位置,设备,网络信息,通知和其他)
如果我指出正确的道路,我会感激不尽,我花了很多时间在这个问题上努力完成这项工作.先感谢您,
只需通过终端在root项目中运行:sudo chown username * -R
如果不起作用,请运行:
sudo chmod +777 -R
* username =您在OS中的用户名