-
Notifications
You must be signed in to change notification settings - Fork 0
Gradle and NetBeans
You just generated your libgdx project, now it's time to start developing its guts in NetBeans! Before you can import your project into NetBeans, make sure you setup your development environment!
Go to File -> Open Project..., navigate to the root folder of your project, then click Open Project. NetBeans will now import your project. This can take a while on the first time, as it downloads the Gradle wrapper and some dependencies.
If you run into problems due to a missing validation-api:1.0.0.GA artifact, delete your Maven cache at C:\Users\username\.m2 or /Users/username/.m2 or /home/username/.m2.
-
Desktop: Right click the desktop project,
Run. You can run it. -
Android: make sure you have a device connected. Right click your Android project,
Tasks -> installDebug. -
iOS RoboVM: Right click the robovm project,
Tasks -> launchIPhoneSimulator(alternatives arelaunchIPadSimulatorandlaunchIOSDevicefor provisioned devices) The first run will take a bit longer as RoboVM has to compile the entire JDK for iOS. Subsequent runs will compile considerably faster! -
HTML5: Right click the gwt project,
Tasks -> superDev. You can now follow the build process in the console. This will take a while, as your Java code is compiled to Javascript. Once you see the messageThe code server is ready, fire up your browser and go to http://localhost:9876. Drag theDev Mode Onbookmarklet to your browser bar. You only have to do this once! Next, go to http://localhost:8080/gwt. This is your app running in the browser! When you change any of your Java code, just click theDev Mode Onbookmarklet while you are on the site and the server at port 9876 will recompile your code and reload the page!
Follow the steps for running the project, but instead of launching via Run, launch your configuration via Debug. Note that RoboVM currently does not support debugging. Debuggin of the GWT build can be done in the browser as follows:
Run the superDev Gradle task as before. Go to http://localhost:8080/gwt, click on the Dev Mode On boorkmarklet and hit Compile. In Chrome, press F12 to bring up the developer tools, go to the sources tab and find the Java file you want to debug. Set breakpoints, step and inspect variables using the power of source maps!
It's easiest to package your application from the command line, or using the Gradle tasks from within NetBeans. To see the relevant Gradle tasks, check the Gradle command line documentation.
-
Developer's Guide
- Introduction
- Goals & Features
- Community & Support
- Contributing
- Games Built with Libgdx
- Prerequisites
- Gradle Project Setup, Running, Debugging and Packaging
- Project Setup, Running & Debugging
- Third Party Services
- Working from Source
- Using libgdx with other JVM languages
- The Application Framework
- A Simple Game
- File Handling
- Networking
- Preferences
- Input Handling
- Memory Management
- Audio
-
Graphics
- Configuration & Querying Graphics ??
- Fullscreen & VSync
- Continuous & Non-Continuous Rendering
- Clearing the Screen
- Take a Screenshot
- OpenGL ES Support * Configuration & Querying OpenGL ?? * Direct Access ?? * Utility Classes * Rendering Shapes * Textures & TextureRegions * Meshes * Shaders * Frame Buffer Objects
- 2D Graphics * SpriteBatch, TextureRegions, and Sprite * 2D Animation * Clipping, with the use of ScissorStack * Orthographic camera * Mapping Touch Coordinates ?? * Viewports * NinePatches * Bitmap Fonts * Distance field fonts * Using TextureAtlases * Pixmaps * Packing Atlases Offline * Packing Atlases at Runtime * 2D Particle Effects * Tile Maps * scene2d * scene2d.ui * Skin
- 3D Graphics * Quick Start * Models * Material and environment * 3D animations and skinning * Importing Blender models in LibGDX * Perspective Camera ?? * Picking ??
- Managing Your Assets
- Utilities
-
Math Utilities
- Interpolation
- Vectors, Matrices, Quaternions
- Circles, Planes, Rays, etc.
- Path interface & Splines
- Bounding Volumes ??
- Intersection & Overlap Testing ??
- Physics
- Tools
- Extensions
- Deploying your Application
- Building Libgdx ??
- Known Issues
- Articles
- Deprecated (May be outdated)
