Java – How do I make a LibGDX + Android Studio jar file?

How do I make a LibGDX + Android Studio jar file?… here is a solution to the problem.

How do I make a LibGDX + Android Studio jar file?

I can’t find a way to create an Android Studio jar file for desktop. I’m using Android Studio 1.3.2 and the LibGDX library. I created a video game and I want to share it with other PCs without having to install Android Studio to run my project.

What am I going to do?

Solution

If you still have a build.gradle

file for your desktop configuration, perform the “dist” build configuration via gradle. As a result, a runnable jar file is created.

If you don’t know how to implement this in Android Studio, you can easily do it from the command prompt:

  • Change to your project directory

  • ./gradlew desktop:dist

Related Problems and Solutions