cordova build Command failed with exit code EACCES

后端 未结 9 1695
半阙折子戏
半阙折子戏 2020-12-13 23:40

Cordova build failed with error code : EACCESS

$ cordova build android
Running command: /home/user/proj1/platforms/android/cordova/build 
execvp(): Permissi         


        
相关标签:
9条回答
  • 2020-12-14 00:25

    My problem was solved by removing the map /platforms/android. After that I added the platform again.

    cordova platform add android

    For me it worked out, but I think there are multiple reasons this error is shown..

    ! Backup your icons !

    Remember to backup your icons in /platforms/android/res/ Or copy the whole map as backup to be sure you don't lose your work...

    0 讨论(0)
  • 2020-12-14 00:27

    Hard to diagnose the problem here. Could you add more information to the problem description?

    For what I can see, which is not too much, it is because one of the executables doesn't have the right exec permissions for your user (assuming you are on Ubuntu 14.04 per your output).

    Ensure Android SDK Tools and Platform-Tools, as well as Oracle JDK and Ant, are in your PATH with the appropriate permissions. Otherwise, put more information here.

    0 讨论(0)
  • 2020-12-14 00:33

    You should add permission to two files:

    Go to Cordova root directory and run:

    chmod a+x platforms/android/gradlew
    chmod a+x platforms/android/cordova/build
    
    0 讨论(0)
  • 2020-12-14 00:34

    For some reason build is not currently an executable file. To fix that, open the terminal and enter the following commands:

    $ cd <your-project-directory>/platforms/android/cordova
    $ chmod a+x build
    
    0 讨论(0)
  • 2020-12-14 00:35

    My advice is to remove the platforms directory, and reinstall each platform.

    $ cd <your-project-directory>
    $ rm -r platforms  # -or- manually remove the directory
    $ cordova platform add <platform>  # ios, android, ...
    

    Running chmod a+x build (as suggested in the accepted answer) doesn't fix cordova platform rm <platform> permission issues. Safer (and easier) to restore each platform to it's default state, instead of hacking (and remembering) permission changes for individual files / directories.

    0 讨论(0)
  • 2020-12-14 00:36

    I have same problems, solved it today after countless of trials and error. I have actually get BUILD SUCCESS to appear.
    the thing is to change the environemnt variable..
    from

    JAVA_HOME : c:\Program Files(x86)\Java\jre
    PATH: c:\Program Files(x86)\Java\jdk1.x.x\bin

    to

    JAVA_HOME : c:\Program Files(x86)\Java\jdk1.x.x\jre
    PATH: c:\Program Files(x86)\Java\jdk1.x.x\bin

    NOTE: the JAVA_HOME has to point to JDK/JRE (the jre child of jdk). I install both jre and jdk. it seems that I need to install both for the cordova-CLI to work on windows8.1.
    I hope this helps.

    0 讨论(0)
提交回复
热议问题