3. Use Gradle to create a Libgdx Project
Create a Libgdx Project
Libgdx projects can be created using a file called a gdx-setup.jar, gdx-setup is a graphical java program, and can also be executed under the command line. You only need to execute this JAR file to open the graphic interface. If you want to use the command line format:
Java-jar gdx-setup.jar
Click to download the latest gdx-setup.jar
Enter the name of your application, the name of your java package, the main class of your application, the output folder and the location of your Android sdk.
Next, select the platform to be supported. (Note: Once the selection is complete, if you need to add a new platform, you need to manually add it !).
Finally, select the desired extension package (some extension packages cannot run on some platforms. If this happens, you will be prompted ).
After setting all the tasks, click "Generate ".
(Because access to Gradle in China is slow, it may take a long time to generate a project for the first time, so be patient. Then the speed is faster .)
After the build is complete, you can now import the generated project to your IDE (Eclipse, Intellij IDEA or NetBeans), run, debug, or package for release!