Original: HTTP://WWW.LIBGDX.CN/TOPIC/22/3-1-ECLIPSE/2
After the project is built, let's now import the project into eclipse.
Before importing the project into Eclipse, make sure you have configured the development environment
Import your project
Go to Gradle project, file, Import, Gradle, click Browse to find the root folder of your project, then click on Build Model, then you will see all the projects, select all the projects, Click Finish. It is important to note that this process may last for a few minutes and gradle will download the dependencies.
Commonly encountered problems
Your eclipse's workspace cannot contain folders that are the same as your project name.
If the following error occurs,
The workaround is to delete your Maven cache, which is generally saved in the C:\users\ user name. m2 or/users/username/.m2 or/home/user name/.m2.
When you import the first item, get the following error:
com/github/jtakakura/gradle/plugins/robovm/robovmplugin:unsupported Major.minor version 51.0
The workaround is that the JDK version must be 1.7 or higher.
Run your project
Desktop: Right-click the Java application. Select the desktop startup class.
Android: Make sure you have linked the debug device and can see it in Ddms, right click on Android project, Run as--android application
iOS RoboVM: Right-click the RoboVM project, run as, iOS Device App runs to a real machine or run as, iOS Simulator runs in a virtual machine.
HTML5: Right-click the HTML project, Run as, External Tools configuration, and create a new configuration by double-clicking the program portal. Enter the configuration name, and so on. When configured, enter http://localhost:8080/html in the browser.
Test your project
Test the project with the debug as option. It is important to note that ROBOVM currently does not support debugging. HTML debugging is done in browser milk.
Package your App
Package your app after you've completed your development.
(www.libgdx.cn All rights reserved, if need to reprint, indicate source)
3.1. Eclipse