TJ-Bot
What is the correct way to run a libgdx project?
It doesn't work when I press run and gives me errors saying that classes are missing, but it does work when i do ./gradlew run in the terminal. what does this mean?
also there's a comment telling me that "
when I run it from the command line with "./gradlew desktop:run". How can I fix this issue?
The issue you are experiencing is likely due to a misconfiguration in your Visual Studio Code setup. When you press run in VSCode, it may not be using the correct classpath or build configuration. To fix this issue, you can modify your VSCode settings to use the correct gradle task for running your libgdx project.
To do this, open your VSCode settings and navigate to the "launch.json" file for your project. In this file, find the configuration for running your project and update the "program" field to use "./gradlew desktop:run" as the command to run your project. This will ensure that VSCode uses the correct gradle task when running your libgdx project.
By updating your VSCode settings to use the correct gradle task for running your libgdx project, you should be able to resolve the issue of missing classes and successfully run your project from within VSCode.