Cordova android build fails immediately [Error: spawn EACCES]

前端 未结 6 1012
我寻月下人不归
我寻月下人不归 2020-12-10 01:28

I am just getting started with with Cordova ( PhoneGap ) and trying to build my first project with it, however I am running into a problem with my compilation step- when I t

相关标签:
6条回答
  • 2020-12-10 02:09

    Its different for every one, I guess. Running --verbose would give you the file that Cordova needs access to. From there you can chmod 777 <file>. The command you should run to figure out the inaccessible file looks like this: cordova build --release --verbose android

    0 讨论(0)
  • 2020-12-10 02:12

    It's a permission issue, just execute:

    chmod 777 "/media/glenatron/localdisk/Projects/Cordova/MyProject/platforms/android/cordova/build"
    

    That should fix the problem.

    0 讨论(0)
  • 2020-12-10 02:13

    For me, this has fixed it:

    chmod 777 /Applications/Android\ Studio.app/Contents/gradle/gradle-2.2.1/bin/gradle

    0 讨论(0)
  • 2020-12-10 02:13

    I was facing the same issue. In my case, I had put the sample cordova project on a different ext3 partition than home folder. Since the partition was not NTFS, permissions shouldn't have been a problem. But when I tried all suggested methods (changing permissions, making everything executable), none of them worked. This problem went away as soon as I created the sample cordova folder in my home partition.

    0 讨论(0)
  • 2020-12-10 02:13

    For MAC users change the name from "Android Studio" to AndroidStudio. My cordova build was taking back slash() in name of android studio so i changed the name of app. It is working for me.

    0 讨论(0)
  • 2020-12-10 02:20

    Using verbose like Solidak suggested works.

    cordova build --release --verbose android

    The last command was to access /platforms/android/gradlew so i chmod +x that file and it worked.

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