I created new libgdx project and i want to run desktop application in Android Studio. Is there something to do with run configurations? In Eclipse i can just choose Run as Java Application.
Asked
Active
Viewed 1.5k times
9
-
@JBaruch what do you mean? – nikoliazekter Jan 04 '15 at 14:38
-
I referred to the now deleted comment by @der_golem – JBaruch Jan 04 '15 at 14:40
2 Answers
10
Ok, i did it. Here is the solution https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA#running-your-project
Run -> Edit Configurations...
, click the plus (+
) button and select Application.
Set the Name to Desktop
.
Set the field Use classpath of module
to desktop
, then click on the button of the Main class
field and select the DesktopLauncher
class.
Set the Working directory
to your android/assets/
(or your_project_path/core/assets/
) folder!
Click Apply
and then OK
.
You have now created a run configuration for your desktop project. You can now select the configuration and run it.

nikoliazekter
- 757
- 2
- 6
- 23
1
Right click on the main method (or anywhere in the main class) and select Run.

JBaruch
- 22,610
- 5
- 62
- 90
-
2Ok, i ran it but it can't load assets. Can you help me with this issue? – nikoliazekter Jan 04 '15 at 14:39
-
-
2libgdx uses shared assets for desktop and android version, desktop version doesn't see this assets folder – nikoliazekter Jan 04 '15 at 15:32