Home > Software engineering >  ./gradlew assemble fails due to missing file when the file clearly exists
./gradlew assemble fails due to missing file when the file clearly exists

Time:02-23

I'm trying to enter image description here

If the file clearly exists, why am I getting this error? Why is the file being discriminated against?

CodePudding user response:

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:

"C:\\x\\Program\ Files\\Msys64\\usr\\share\\aclocal"

Where \\ gives \ and \ gives .


To use ${File.separator} would be the alternate cross-platform approach.

This would give \ on Windows and / on Linux.

  • Related