Unable to run gradlew

痴心易碎 提交于 2019-12-05 14:35:46

问题


I've setup a build.gradle file with apply plugin: 'java'. I tried setting up a gradle wrapper using the instructions here, but when I type sudo ./gradlew build, I get an error sudo: ./gradlew: command not found. When I type gradle build, the project builds fine. It's just gradlew that isn't working.
I even tried sudo chmod +x gradlew but it didn't work. I'm using Fedora 20, 64 bit and gradle version 1.10.


回答1:


Ok so the solution was to run gradlew on the Linux partition itself. Somehow, when I ran it from a Windows partition mounted in Linux, the file couldn't get execute permissions even though I ran chmod 777 gradlew. When I copied the project into the Linux filesystem and ran it, it worked fine (after setting execute permission for it).



来源:https://stackoverflow.com/questions/21598097/unable-to-run-gradlew

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!