Phonegap Hook - execvp Permission denied

拜拜、爱过 提交于 2019-12-06 10:52:43

问题


I'm trying to run a phonegap hook which I found on the net but I always get the same error on build

execvp() Permission denied

the hook is the "splash and icon" hook located here:

http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/#comment-332073

any help is much appreciated


回答1:


Found the answer

chmod -R 777 before_build




回答2:


Even i got the same error when i tried to add a platform to the ionic application. Its not just the problem with phone gap. It is also a headache while adding platforms in an ionic application. I was searching for the solution and finally, i landed at this page. Based on Luke Snowden answer i tried to find the solution. But in ionic app, there won't be any folder with the name before_build. And the solution is just changing the mode of files present in the hooks folder. The permissions should have +x i.e. execute permissions.

Go to hooks folder, you may find the following two folders

1) after_prepare
2) before_platform_add

Change the permissions of two folders to +x

chmod -x <folder name>

You can even change individual file's permission also. Go to the respected folder and say

chmod -x <file name>

for each file to change the mode to +x.

After you are done with the above process, now we can add platforms to the application.

ionic platform add android

Now it wont show any errors on the console.

Hope this might help people who are facing the similar kind of problem.




回答3:


Go to the root folder and go one folder upwards. Then give execute permission only rather than giving 777. This worked for me.

chmod -R +x folder_name

cordova build Command failed with exit code EACCES



来源:https://stackoverflow.com/questions/25433803/phonegap-hook-execvp-permission-denied

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