This is my first time i'm using cordova and phonegap. I have tried the two and none of them is working for me. For phonegap latest documentation, you don't need to install some plugins they are already bundle with it. Like the device,contact,network-information and from the android configuration permissions are already been given to them.
And the problem i have with cordova 3.5(latest) is when i install plugin and try to build or run i have permission problem and if i give the plugin directory a permission then these error pop up
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
And if run or build with root permission i get this error:
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)
but when no plugin is install it runs perfectly. I'm using ubuntu 12.04.
And why is the phonegap(latest) plugins not working, i mean the default APIs(contact,geolocation,device,network-information,notification and the rest)
I would be grateful if point me on right path, i spent great deal of time on this issue for days trying to make this work. Thank You in advance,
Just run in root project via terminal:
sudo chown username * -R
If not works, run:
sudo chmod +777 -R
*username = your username in OS
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