Fish
Fish

Reputation: 1697

Is there a way to deploy Libgdx Desktop application with Android Studio (An IntelliJ Idea based IDE)

I have read this article about deploying libgdx application on linux, windows and macs.

However, it only describes how to export using eclipse. I am currently using Android Studio and it deploys android *.apk files very nicely. And I intend to keep using this. However, I had not figured out a way to deploy the desktop version of the project.

Can anyone tell me how to deploy a Libgdx Desktop application with Android Studio (or Intellij Idea because they are pretty much the same).

Upvotes: 3

Views: 9593

Answers (5)

enyciaa
enyciaa

Reputation: 2122

You can setup Android Studio to run the desktop version by setting up a new run configuration. Then you can run the desktop version just like you would the Android version.

Follow this link: Configuring a libGDX project to run as a desktop application in Android Studio.

Upvotes: 1

Aleks Vidmantas
Aleks Vidmantas

Reputation: 69

A simple way of deploying on windows is to make a jar using gradle with the command gradlew desktop:dist in terminal. A similar command can be used on Linux as well.

Upvotes: 0

Saeid Dadkhah
Saeid Dadkhah

Reputation: 411

In GUI we can do it.

Menu: Run -> Edit Configurations -> Add New Gradle Configurations

Gradle project: choose main Gradle project

Taske : gradlew desktop:dist

Then Run this configuration.

From this link: exporting-a-libgdx-game-as-executable-jar-from-android-studio

Upvotes: 0

Dragos Rachieru
Dragos Rachieru

Reputation: 642

you can simply click on Gradle panel in the right, select :desktop, press the Execute Gradle Task, type dist and press enter, that's it.

Jar is located in /desktop/build/libs.

lbalazscs gave you a more detailed answer, so i recommend you doing what he said.

Upvotes: 10

lbalazscs
lbalazscs

Reputation: 17784

Yes, tell Gradle to build a jar for you. Here's how.

In Android Studio you can start the Gradle tasks from the GUI on the right side. Anyways, I recommend you to learn first without an IDE.

Upvotes: 3

Related Questions