Search code examples
gradlegradlew

Gradle : gradlew expecting in


i am facing this issue

sparsh610@DESKTOP-551C51M:/mnt/e/xxxxxxxxx$ ./gradlew mm
: not found2: ./gradlew:
: not found8: ./gradlew:
./gradlew: 52: ./gradlew: Syntax error: word unexpected (expecting "in")

i verified that my system has gradle installed and with all the read write access.

any specific reason for this error ?

Already checked this link


Solution

  • Its simply a difference between UNIX and windows handling end of line character, so easy to solve just type sed -i.bak 's/\r$//' gradlew this will replace the carriage return. With the option -i, the file will be edited in-place, and the original file will be backed up as gradlew.bak