当文件明显存在时,./gradlew assemble 由于文件丢失而失败
我正在尝试使用以下命令按照此链接中的描述构建 JPostal:
./gradlew assemble
但是,该命令产生以下输出,声称文件 C:\x\Program Files\Msys64\usr\share
不存在当它明确存在时:
$ ./gradlew assemble
:buildJniLibaclocal-1.16: error: aclocal: file '/x/Program Files/Msys64/usr/share/aclocal/tcl-tea.m4' does not exist
autoreconf-2.71: error: aclocal failed with exit status: 1
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: Files/JPostal/src/main/jniLibs
configure: error: cannot find required auxiliary files: compile config.guess config.sub ltmain.sh missing install-sh
make: *** No rule to make target 'install'. Stop.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildJniLib'.
> Process 'command 'sh'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.844 secs
我可以清楚地看到文件名为tcl-tea.m4
位于目录:C:\x\Program Files\Msys64\usr\share\aclocal
请参见下面的屏幕截图:
如果文件明显存在,为什么我会收到此错误?为什么文件会受到歧视?
I'm trying to build JPostal as described in this link using the following command:
./gradlew assemble
However, the command produces the following output claiming the file C:\x\Program Files\Msys64\usr\share
does not exist when it clearly does:
$ ./gradlew assemble
:buildJniLibaclocal-1.16: error: aclocal: file '/x/Program Files/Msys64/usr/share/aclocal/tcl-tea.m4' does not exist
autoreconf-2.71: error: aclocal failed with exit status: 1
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: Files/JPostal/src/main/jniLibs
configure: error: cannot find required auxiliary files: compile config.guess config.sub ltmain.sh missing install-sh
make: *** No rule to make target 'install'. Stop.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildJniLib'.
> Process 'command 'sh'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.844 secs
I can clearly see a file named tcl-tea.m4
in the directory: C:\x\Program Files\Msys64\usr\share\aclocal
See the screenshot below:
If the file clearly exists, why am I getting this error? Why is the file being discriminated against?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管支持这些,但带空格的路径在 Linux 上通常会出现问题。
即使没有
build.gradle
,路径也明显是错误的;这可能需要转义:其中
\\
给出\
,而\
给出。
使用
${File.separator}
将是替代的跨平台方法。这将在 Windows 上给出
\
,在 Linux 上给出/
。Despite these are supported, but paths with spaces generally tend to be problematic on Linux.
Even without the
build.gradle
, the path is obviously wrong; this likely needs to be escaped:Where
\\
gives\
and\
gives.
To use
${File.separator}
would be the alternate cross-platform approach.This would give
\
on Windows and/
on Linux.