Export Libgdx game as an executable jar from Android Studio

Ok, so I made the game using Libgdx, and I decided that this is an Android application (which is why I use Android studio), but I want my friend without Android phones to try this. The project is already configured for both desktop and Android. Is there a way to export this as a jar executable?

+7
android-studio executable-jar libgdx
source share
2 answers

Enter the command below in the terminal. Remember that before issuing this command you must be in the root directory of LibGDX.

gradlew desktop:dist 

Optional: https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-the-desktop

+9
source share

You need to enter

 gradlew desktop:dist 

in a terminal in Android Studio . Then you must have the jar executable in the project directory / desktop / build / libs.

+1
source share

All Articles