0

Whenever I run ./gradlew buildForProd, it gives me this error. I'm using windows.

'.' is not recognized as an internal or external command,
operable program or batch file.

EDIT:

Thanks Mofi for the resources.

After running .\gradlew, this is what I got.

Starting a Gradle Daemon, 19 busy Daemons could not be reused, use --status for details
:buildForProd FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildForProd'.
> A problem occurred starting process 'command './gradlew''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 12s
1 actionable task: 1 executed
Steven Ng
  • 29
  • 5
  • 3
    Please read the Microsoft documentation [Naming Files, Paths, and Namespaces](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file) to get knowledge that on Windows ``\`` is the directory separator and not `/` as on Linux and Mac. So the command line to run `gradlew` (best specified with file extension) from current directory is using `gradlew buildForProd` or `.\gradlew buildForProd`. – Mofi Jul 22 '20 at 09:20
  • PS: Run `where gradlew` to find out if that file is found out all with file extension defined in environment variable `PATHEXT` in current directory or all directories defined in environment variable `PATH` on not using ``.\`` at beginning. Please take a look on [What is the reason for "X is not recognized as an internal or external command, operable program or batch file"?](https://stackoverflow.com/a/41461002/3074564) – Mofi Jul 22 '20 at 09:23

0 Answers0