vscode-wpilib icon indicating copy to clipboard operation
vscode-wpilib copied to clipboard

Building Robot Code Java

Open 6867-Student opened this issue 6 years ago • 8 comments

Im one of the programmers for Team 6867 and I was having a problem with trying to build our code. 'gradlew' is not recognized as an internal or external command, operable program or batch file. The terminal process terminated with exit code: 1 That is the error message we received and usually when we get this its because the TDSB blocks certain things from gradle but even while doing off of someones data we got the same error. All responses are appreciated!

6867-Student avatar Jan 11 '19 20:01 6867-Student

You likely have the wrong folder open in vscode. You need to be opening the folder with build.gradle and gradlew.bat as the root folder in vscode. It can't be in a subfolder.

ThadHouse avatar Jan 11 '19 20:01 ThadHouse

You likely have the wrong folder open in vscode. You need to be opening the folder with build.gradle and gradlew.bat as the root folder in vscode. It can't be in a subfolder.

Im not sure I understand what you are talking about do you think you can go into more depth?

6867-Student avatar Jan 11 '19 20:01 6867-Student

Post a picture of the file tree you have open in vscode. If you have the entire file tree collapsed, you should see files like build.gradle and gradlew.bat. if you only have 1 folder, and that folder contains those files, you have the wrong folder open, and you need to open that inner folder.

ThadHouse avatar Jan 11 '19 20:01 ThadHouse

image Thats our file tree

6867-Student avatar Jan 11 '19 21:01 6867-Student

That's the issue. You need to be opening that competition-code folder as the folder in vscode for the extension to work.

ThadHouse avatar Jan 11 '19 21:01 ThadHouse

Having a similar issue but i get this

**Executing task: gradlew build -Dorg.gradle.java.home="C:\Program Files\Java\jdk-11.0.2" <

The terminal process terminated with exit code: 2**

Chanduniverse avatar Feb 03 '19 17:02 Chanduniverse

@Chanduniverse Usually that means a JDK error. Can you try removing and reinstalling the JDK? Also, if you're on windows you should be using the WPILib installer and its copy of vscode, as that make issues like this less likely to happen.

ThadHouse avatar Feb 06 '19 03:02 ThadHouse

@ThadHouse I reinstalled but still getting the same error

Chanduniverse avatar Feb 07 '19 22:02 Chanduniverse