New app: LibGDX Project Setup

Apr 4, 2012 by     27 Comments    Posted under: Desktop applications, LibGDX Project Setup

I teased a bit about that on Twitter, and it’s now over: let me introduce the new LibGDX Project Setup application!

This one is a special request from Mario Zechner, lead developer of the LibGDX framework. Its aim is to heavily facilitate the setup process of people games. Indeed, now that LibGDX 0.9.3 was officially released, the creation of up to four eclipse projects may be required to develop a game:

  1. A core project, targeting no backend and thus not directly runnable, which contains the source files.
  2. A project for the desktop backend, which compiles the game as a runnable jar file. It contains at least the source file of the desktop launcher, and any code that is related to the desktop.
  3. A project for the android backend, which compiles the game as an android apk file. This one contains the required source file to declare an android Activity. Note that this is also this project which stores all the assets of the game. Other projects use folder-linking, an eclipse feature, to retrieve these assets.
  4. And finally a project for the html5 backend, which compiles the game as a web page, using the GWT technology. Java source files are converted to javascript, and the opengl rendering is entirely backed by WebGL.

Configuring each project by hand can become a bit tedious and is often error-prone for new users, especially when if they are inexperienced. Indeed, the LibGDX library features various jar files needed by the different projects, as well as some native files for the android backend. Placing the files in the right folders and correctly linking them to the eclipse projects often results in a few mistakes. That’s why this application is born :)

View of the application and its four panels (click for larger image)

The application

The application main window features four panels, each clearly identified to guide the user through the different steps. The configuration panel is self-explanatory. Note that some settings can be tweaked in the advanced settings view, especially the android target/min/max platform versions.

The library selection panel lets you select the LibGDX release you want to use. You have the choice: either hit browse button to select the zip archive of the library, or you can also directly download its stable or nightlies version if you don’t have it on your drive already.

The overview panel lets you see if the choices you made in the configuration panel suits your needs. The virtual view of the projects is regenerated as soon as you change something, and is the exact representation of what will be generated on your hard drive.

Finally, the generation panel notifies you if everything is okay. Clicking the generation button opens a dialog showing the generation process (make sure it goes all the way to “all done”). I included in this dialog a FAQ with detailed tutorials to show how to import the projects into eclipse, and how to fix the error of the html project mentioned by eclipse on first launch.

About the third-party libraries

This feature is not totally ready yet, but its goal is to propose an increased visibility to useful third-party libraries proposed by the community to enhance libgdx games. I need to setup a web interface for developers to register their library, and the tool will automatically download their definitions and propose them as additional downloads.

Anyway, have fun with the application, and don’t hesitate to report any issue or suggestion you may have. It has been thoroughly tested, but there may be a few untested corner-cases left.


The application is available directly from the LibGDX repository. Have a look at the ProjectSetup wiki page for detailed instructions. You can also directly download it using this link. It points to the latest nightly build of the application.

27 Comments + Add Comment

  • Haha, nice tool you’ve you got there!

    Well, I already hooked everything up and am now having all my games based on the generated projects =). I can’t wait for the 3rd party add-on to be available!

  • Very convenient tool. Keep up the good work. :D

  • Awesome stuff… I have many months to use libgdx, but I think I will dive in again. Thanks to you, I will be able to start as soon as possible :-)

  • Very useful tool! I have to thank you in the name of community.

    I have some suggestions:

    Possibility to mark directories (or files) as ignored for revision control systems. For example core project would have bin directory added in svn:ignore right after project generation. (Similar options are probably available also for CVS, Git and other revision control systems). I’m not sure if one can create SVN properties without specifying repository URL.

    As beginner in Android development I would like to see what does it mean to specify SDK version – how is it translated to Android OS versioning. Even better would be to display percentage of devices that I’m targeting by restricting SDK versions. This would require some web service providing current Android OS ratios.

  • Amazing tool ! Thank you for that !

    It’s a very clean and polished application !

    I can’t wait for the “third-party libraries” option !!!!

  • Looks great! I will use it today for a new project!!

  • Thank you, it’s really so useful for non-experts.

  • As the desktop assets are linked to android assets now
    I have Issue with Gdx.files.internal use
    when using FileHandle textureDir = Gdx.files.internal(“/data/textures”);
    nothing is obtained in textureDir.list();
    even though in android project i have 2 folders 16,24 in textures folder
    please help

    • I’m no expert in folder linking. The tool only proposes the setup recommended by libgdx. Ask the question in libgdx forums, or post an issue report in the libgdx issue tracker. I’ll try to reproduce this error and tell you.

  • I have same problem like @nishe, some solution? I dont have a problem to keep 2 separate folders but it would be much cleaner if we can link folders.

    • It may be caused by some bad project configuration that may have slipped into the files generated by the app. I’ll investigate that this evening. Did you try to add folder linking by hand into the generated projects? If so, what lines changed in your “.project” files?

  • Guys, I fixed all the issues of the tool. Download it again (make sure it’s 1.0.1). Asset sharing works well and all projects compile and run totally fine.

  • Hello,

    thanks for the tool.
    I just tried it but got the error message below after pressing the generate projects button :(

    Decompressing projects…
    [error] Unable to create directory __libgdx_setup_tmp

    any idea what I’m doing wrong?


    • Well, the application tries to create a temporary directory in the directory it is located. If it cannot do that in your case, it may be because creating a directory requires some advanced privileges. It is the case in Windows Vista/7 if you placed the application in “C:\” or in “C:\Program Files”. In this case, you’ll have to give it administrator privileges before running it.

  • [...] is more: recently, Aurelien Ribon published the handy Gdx Setup UI – a great way to set up a new libGDX project, a process far [...]

  • Don’t mean to be a bother, but I got the main project and the desktop project to go in Netbeans without a problem. However, Android and HTML give me these problems:

    Description Resource Path Location Type
    The project was not built since its build path is incomplete. Cannot find the class file for Fix the build path then try building this project test-html Unknown Java Problem

    Description Resource Path Location Type
    The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project test-android Unknown Java Problem

  • If you integrate the library “Scoreloop” would be great!

  • It’s been a year since I’ve used libgdx. I’ve notice there is a Core project required as well. I’m rather confused. The Desktop project holds all the assets, the android project references to the desktop project and the Core is the entry point? So do I put my logic in the core project? But my assets in the desktop project?

  • I’m amazed, works great. Congrats!

  • メガネ サングラス

  • i placed my gdx file in the desktop and the destination file on my desktop and im still getting this message, please help

    [error] Unable to create directory __libgdx_setup_tmp

  • Whenever I run the Project Setup UI, it doesn’t download the things in the Library Selection, how should I fix this?

  • [...] know more about libgdx project setup watch this video or you can read this tutorial Getting your AppWarp application [...]

  • [...] know more about libgdx project setup watch this video or you can read this tutorial Getting your AppWarp application [...]

  • Awesome job, I really like your blog. If you want you can check out my game which i’ve just released. It’s using libGDX

Leave a comment to Dylan

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>