gradlew command not found?

后端 未结 14 1933
花落未央
花落未央 2020-12-12 17:38

I am working on a Java project with gradlew. I use Ubuntu Linux as my OS. When I run \"gradle\" it runs, and gives me info. But when I run \"gradlew\", it outputs as \"No co

相关标签:
14条回答
  • the same problem occurs to me... I check the file wrx permissions with:
    $ls -l ./gradlew -> -rw-rw-r-- (no execute permission)

    so I use command $chmod +x ./gradlew and this problem solved.

    0 讨论(0)
  • 2020-12-12 18:11

    If the answer marked as correct does not work, it is because you need to identify yourself as a super user.

    sudo gradle wrapper --gradle-version 2.13

    It worked for me.

    0 讨论(0)
  • 2020-12-12 18:12

    I use intellj idea and in windows in terminal type: gradlew.bat run it is working for me.

    0 讨论(0)
  • 2020-12-12 18:15

    For Ubuntu(linux) users: doing "bash ./gradlew build " works but "./gradlew build " doesnot work.

    For me the issue was it was on NTFS file system, linux does not let execute a script from NTFS. Try moving the code from NTFS to a linux partition. then ./gradlew build should work

    0 讨论(0)
  • 2020-12-12 18:16

    In addition is @suraghch

    Linux / MacOS ./gradlew clean

    Windows PowerShell .\gradlew clean

    Windows cmd gradlew clean

    0 讨论(0)
  • 2020-12-12 18:20

    First thing is you need to run the gradle task that you mentioned for this wrapper. Ex : gradle wrapper After running this command, check your directory for gradlew and gradlew.bat files. gradlew is the shell script file & can be used in linux/Mac OS. gradlew.bat is the batch file for windows OS. Then run,

    ./gradlew build (linux/mac). It will work.

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