Estoy tratando de construir JPostal como se describe en este enlace usando el siguiente comando:
./gradlew assemble Sin embargo, el comando produce el siguiente resultado que afirma que el archivo C:\x\Program Files\Msys64\usr\share no existe cuando claramente existe :
$ ./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 Puedo ver claramente un archivo llamado tcl-tea.m4 en el directorio: C:\x\Program Files\Msys64\usr\share\aclocal
Vea la captura de pantalla a continuación:
Si el archivo claramente existe, ¿por qué recibo este error? ¿Por qué se discrimina el archivo?
A pesar de que estos son compatibles, las rutas con espacios generalmente tienden a ser problemáticas en Linux.
Incluso sin build.gradle , la ruta obviamente es incorrecta; esto probablemente necesita ser escapado:
"C:\\x\\Program\ Files\\Msys64\\usr\\share\\aclocal" Donde \\ da \ y \ da .
Usar ${File.separator} sería el enfoque multiplataforma alternativo.
Esto daría \ en Windows y / en Linux.