gradlew: Permission Denied

后端 未结 14 2161
闹比i
闹比i 2020-12-02 03:45

I am attempting to run gradlew from my command line, but am constantly facing the following error.

Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew com         


        
相关标签:
14条回答
  • 2020-12-02 04:32

    Try below command:

    chmod +x gradlew && ./gradlew compileDebug --stacktrace
    
    0 讨论(0)
  • 2020-12-02 04:33

    Could also be fixed with

    git update-index --chmod=+x gradlew
    
    0 讨论(0)
  • 2020-12-02 04:37

    if it doesn't work after chmod'ing make sure you aren't trying to execute it inside the /tmp directory.

    0 讨论(0)
  • 2020-12-02 04:38

    You need to update the execution permission for gradlew

    Locally: chmod +x gradlew

    Git:

    git update-index --chmod=+x gradlew
    git add .
    git commit -m "Changing permission of gradlew"
    git push
    

    You should see:

    mode change 100644 => 100755 gradlew
    
    0 讨论(0)
  • 2020-12-02 04:38

    This error is gradle permission related . Just paste below line in your terminal and run...

    chmod a+rx android/gradlew

    0 讨论(0)
  • 2020-12-02 04:42

    In my case, I had executed permissions and I couldn't run gradlew even with sudo. my problem was my project was in another hard drive and I didn't have exec permission on that drive. I simply removed noexec mount flag from fstab and added exec flag. then remount the disk so changes apply.

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