I am trying to learn ionic cross platform tool. i have setup thing required for example application ionic serve
is working fine but when i try to run sudo ionic build android
or sudo ionic run/emulate android
it returns with error message.
我正在尝试学习离子交叉平台工具。我已经设置了所需的例子应用程序离子服务工作正常,但当我尝试运行sudo离子生成android或sudo离子运行/模拟android它返回错误消息。
Error: spawn EACCES at exports._errnoException (util.js:746:11) at ChildProcess.spawn (child_process.js:1162:11) at Object.exports.spawn (child_process.js:995:9) at Object.exports.spawn (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:103:31) at runScriptViaChildProcessSpawn (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:189:23) at runScript (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:132:16) at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115:20 at _fulfilled (/usr/lib/node_modules/cordova/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/lib/node_modules/cordova/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/lib/node_modules/cordova/node_modules/q/q.js:749:13)
i am unable to understand what does its mean. i have google this thing but after appling all of those solutions i got same error. i ll highly thankful if any one can tell me what is going wrong with me.
我无法理解它的意思是什么。我有谷歌这个东西,但在应用所有这些解决方案后,我得到了相同的错误。如果有人能告诉我出了什么问题,我将非常感激。
7 个解决方案
#1
34
The issue is with the command 010_add_platform_class.js
missing execute permission.
问题是命令010_add_platform_class.js缺少执行权限。
You could use chmod +x hooks/after_prepare/010_add_platform_class.js
to give execute permission.
您可以使用chmod + x hooks / after_prepare / 010_add_platform_class.js来授予执行权限。
I found this solution on the Ionic framework forum at the below link.http://forum.ionicframework.com/t/how-to-fix-this-error-spawn-eacces/20490/6
我在以下链接的Ionic框架论坛上找到了这个解决方案.http://forum.ionicframework.com/t/how-to-fix-this-error-spawn-eacces/20490/6
#2
4
Successfully Worked
chmod +x hooks/after_prepare/010_add_platform_class.js
#3
4
First try to give execution permission to one file in hooks folder (010_add_platform_class.js
), you can use this command:
首先尝试为hooks文件夹(010_add_platform_class.js)中的一个文件赋予执行权限,可以使用以下命令:
chmod +x hooks/after_prepare/010_add_platform_class.js
If it does not work, change the permissions of complete files in sdk folder by:
如果它不起作用,请通过以下方式更改sdk文件夹中完整文件的权限:
chmod +x -R /home/username/Android/Sdk
If you are installed gradle
in separate, give permission to that folder also:
如果您单独安装gradle,则还授予该文件夹的权限:
chmod +x -R /home/username/Android/gradle-2.3
#4
3
You can try ionic hooks add
if other fix have not worked
如果其他修复无效,您可以尝试使用离子钩添加
#5
2
While the given solution did take me a step further, adding execute permissions to android sdk was also needed.
虽然给定的解决方案确实让我更进一步,但还需要为android sdk添加执行权限。
chmod +x -R /home/username/Android/Sdk
see Error: spawn EACCES when trying to build Ionic app in Ubuntu 15.10
请参阅错误:在Ubuntu 15.10中尝试构建Ionic应用程序时生成EACCES
#6
1
I tried this, it's working
我试过这个,它正在工作
chmod +x hooks/after_prepare/010_add_platform_class.js
#7
-1
Try running this in your app folder :
尝试在您的app文件夹中运行:
ionic hooks add
离子钩添加
#1
34
The issue is with the command 010_add_platform_class.js
missing execute permission.
问题是命令010_add_platform_class.js缺少执行权限。
You could use chmod +x hooks/after_prepare/010_add_platform_class.js
to give execute permission.
您可以使用chmod + x hooks / after_prepare / 010_add_platform_class.js来授予执行权限。
I found this solution on the Ionic framework forum at the below link.http://forum.ionicframework.com/t/how-to-fix-this-error-spawn-eacces/20490/6
我在以下链接的Ionic框架论坛上找到了这个解决方案.http://forum.ionicframework.com/t/how-to-fix-this-error-spawn-eacces/20490/6
#2
4
Successfully Worked
chmod +x hooks/after_prepare/010_add_platform_class.js
#3
4
First try to give execution permission to one file in hooks folder (010_add_platform_class.js
), you can use this command:
首先尝试为hooks文件夹(010_add_platform_class.js)中的一个文件赋予执行权限,可以使用以下命令:
chmod +x hooks/after_prepare/010_add_platform_class.js
If it does not work, change the permissions of complete files in sdk folder by:
如果它不起作用,请通过以下方式更改sdk文件夹中完整文件的权限:
chmod +x -R /home/username/Android/Sdk
If you are installed gradle
in separate, give permission to that folder also:
如果您单独安装gradle,则还授予该文件夹的权限:
chmod +x -R /home/username/Android/gradle-2.3
#4
3
You can try ionic hooks add
if other fix have not worked
如果其他修复无效,您可以尝试使用离子钩添加
#5
2
While the given solution did take me a step further, adding execute permissions to android sdk was also needed.
虽然给定的解决方案确实让我更进一步,但还需要为android sdk添加执行权限。
chmod +x -R /home/username/Android/Sdk
see Error: spawn EACCES when trying to build Ionic app in Ubuntu 15.10
请参阅错误:在Ubuntu 15.10中尝试构建Ionic应用程序时生成EACCES
#6
1
I tried this, it's working
我试过这个,它正在工作
chmod +x hooks/after_prepare/010_add_platform_class.js
#7
-1
Try running this in your app folder :
尝试在您的app文件夹中运行:
ionic hooks add
离子钩添加