./gradlew assemble 当文件明显存在时由于缺少文件而失败
./gradlew assemble fails due to missing file when the file clearly exists
我正在尝试 build JPostal as described in this link 使用以下命令:
./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
请参阅下面的屏幕截图:
如果文件确实存在,为什么会出现此错误?为什么文件被歧视?
尽管支持这些,但在 Linux.
上,带有空格的路径通常会出现问题
即使没有build.gradle
,路径也明显错误;这可能需要转义:
"C:\x\Program\ Files\Msys64\usr\share\aclocal"
其中 \
给出 \
而 \
给出
.
使用 ${File.separator}
将是另一种 cross-platform 方法。
这将在 Windows 上给出 \
,在 Linux 上给出 /
。
我正在尝试 build JPostal as described in this link 使用以下命令:
./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
请参阅下面的屏幕截图:
如果文件确实存在,为什么会出现此错误?为什么文件被歧视?
尽管支持这些,但在 Linux.
上,带有空格的路径通常会出现问题
即使没有build.gradle
,路径也明显错误;这可能需要转义:
"C:\x\Program\ Files\Msys64\usr\share\aclocal"
其中 \
给出 \
而 \
给出
.
使用 ${File.separator}
将是另一种 cross-platform 方法。
这将在 Windows 上给出 \
,在 Linux 上给出 /
。