什么导致这个项目在Macbook Pro上失败,因为它在Windows 10上运行得很好

时间:2017-09-05 13:37:20

标签: nativescript

我在Windows中有一个nativescript应用程序,可以很好地部署到模拟器,但是当我将git克隆到MacBook Pro并运行相同的过程时,我得到:

 new-host:nativescript jbaird$ tns run android
    Searching for devices...
    Starting Android emulator with image Nexus_5X_API_26
    Waiting for emulator device initialization...
    Executing before-liveSync hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-liveSync/nativescript-angular-sync.js
    Executing before-prepare hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-prepare/nativescript-dev-typescript.js
    Found peer TypeScript 2.4.2
    Preparing project...
    Project successfully prepared (Android)
    Building project...
    Unable to apply changes on device: emulator-5554. Error is: spawn EACCES.
    Executing after-watch hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/after-watch/nativescript-dev-typescript.js

有什么想法吗?提前谢谢。

2 个答案:

答案 0 :(得分:1)

错误是权限错误。因此,您只需要访问运行应用程序的文件夹即可。该过程涉及您将以下命令复制并粘贴到您的终端中。 sudo chmod -R a + rwx / AppFolder 该命令是管理员命令,因此,您可能必须插入系统密码。

PS:当然,你按Enter键会出现提示输入你的密码。 如果您对此解决方案有任何挑战,请告诉我们!

答案 1 :(得分:0)

emulator-5554. Error is: spawn EACCES.emulator-5554. Error is: spawn EACCES.

似乎是一个权限错误。你可以通过以下方式解决它:

  • sudo,
  • 或者,通过给你的hooks文件夹提供+ x permision?