Setting the Project Up

If you want to work on the code of libGDX itself, you need to get it set up on your local machine. For this, Android Studio is strongly recommended as IDE!

If you want to submit code back to the project, please also take a moment to review our guidelines.

  1. Fork libGDX and clone the repo:
    git clone git://
    cd libgdx
  2. Fetch the native binaries, which were built on the snapshot build server. Even if you plan on building natives later yourself, it’s recommended to bring these down so you can test your development environment is setup correctly before moving to the next step.
    ./gradlew fetchNatives
  3. Importing the project:

    a) Via IntelliJ/Android Studio:

    • File > Open > libGDX root build.gradle
    • Import all projects
    • Wait until everything is synced and indexed
    • View > Tool Windows > Gradle, sync gradle button
    • Make sure the Gradle sync succeeds, if not resolve the issues at hand.
    • Go into preferences and turn off configure on demand
    • Try running the LwjglTestStart class located in tests/gdx-tests/gdx-tests-lwjgl/src by right clicking and running
    • You should get assets not found when you try to run a test, edit the run configuration and point it to the correct assets folder (tests/gdx-tests-android/assets)

b) Via Eclipse: File > Import > Gradle > Gradle project


All of the other projects are hooked up and ready to test given that you have set up your system correctly, so give them a go.

Its recommended to run the Android and GWT tests on command line with the following:

./gradlew tests:gdx-tests-android:installDebug

./gradlew tests:gdx-tests-gwt:superDev

To use your local changes in another project, you can install libGDX to your local maven repository by running the following command:

mvn install

This will build and install libGDX and all core components to your local maven repository with the current version declared in the pom.xml files.


If you want to build the libGDX natives yourself, you can find instructions here.