'gradlew' is not recognized as an internal or external command


#1

Every time I try and build the robot code I get this error. Here is the terminal output:


'gradlew' is not recognized as an internal or external command,
operable program or batch file.
The terminal process terminated with exit code: 1

The project is code pulled directly from a GitHub project and no changes have been made. The code builds on the other workstation too.

Any help would be appreciated, Thanks

Edit: I had the wrong folder opened as the base folder in the workspace. Thanks to Thad_House for his help.


#2

Are you opening the correct folder in vscode? You need to have the folder with build.gradle and gradlew.bat open as the root of vscode. It cannot be in a subfolder. You have gradlew.bat too, right?


#3

Where are you building it? In Visual Studio Code, Windows Command Prompt, or a Linux terminal?


#4

I am running it in visual studio code.


#5

Here is a picture of the tree view. Do I have the project opened correctly?


#6

I had the wrong folder opened. I opened one too many folders upstream.


#7

Yup, you had the wrong folder. We’re going to put some warnings in the next vscode patch to help teams with issues like that.


#8

Hello,

We are having the same issue. Can we video chat or can you walk us through how you fixed the problem. Thanks.

Bionic Broncos - 6686


#9

File->Open Folder

Choose the top level folder for the project that has the gradle stuff in it.