¿Como puedo solucionar un failed build en VS Code ocasionado por una error de interpretación de gradlew?

Juan Felipe Zepeda 0 Reputation points
2023-02-24T13:30:21.4933333+00:00

Al intentar correr un programa de JAVA para un robot de FRC con las librerías de WPIlib en Visual Studio Code, me sale error y el código no se ejecuta, es decir al hacer click en "build robot code" no termina de compilarse y aparece el siguiente error en la terminal:

  • Executing task: ./gradlew build -Dorg.gradle.java.home="/Users/juanfelipezepeda/wpilib/2023/jdk"

zsh:1: ./gradlew: bad interpreter: /bin/sh^M: no such file or directory

  • The terminal process "/bin/zsh '-c', './gradlew build -Dorg.gradle.java.home="/Users/juanfelipezepeda/wpilib/2023/jdk"'" failed to launch (exit code: 127).
  • Terminal will be reused by tasks, press any key to close it.
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
214 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
998 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.