The problem's cause was that Git on Windows converted the line endings of gradlew from Unix style (LF) to Windows style (CRLF).
You can turn off that automatic conversion using git config core.autocrlf false.
Setting the line endings of gradlew back to Unix style fixed the problem.
In Vim this is done using :set fileformat=unix.
You can turn off that automatic conversion using git config core.autocrlf false.
Setting the line endings of gradlew back to Unix style fixed the problem.
In Vim this is done using :set fileformat=unix.
本文介绍了一个关于Windows环境下使用Gradle时遇到的问题:Git将Gradle的行尾从Unix风格转换为Windows风格,导致了错误。文章提供了两种解决方案:一是通过配置Git禁用自动转换,二是将Gradle文件的行尾设置回Unix风格。
1万+

被折叠的 条评论
为什么被折叠?



