I struggled with the following error for multiple hours:
The problem was the line ending of the file gradlew being CRLF instead of LF after cloning.
I last encountered it a few years ago, so I forgot this could be a problem. This could prevent someone else wasting so much time on this error.
Note: This might have something to do with the git distribution one is using, since the behavior can also be set globally. I'm using the x64 portable distribution from here, which does not set this behavior: https://git-scm.com/download/win
I struggled with the following error for multiple hours:
The problem was the line ending of the file
gradlew
beingCRLF
instead ofLF
after cloning. I last encountered it a few years ago, so I forgot this could be a problem. This could prevent someone else wasting so much time on this error.Note: This might have something to do with the git distribution one is using, since the behavior can also be set globally. I'm using the x64 portable distribution from here, which does not set this behavior: https://git-scm.com/download/win