(Original: Http://www.libgdx.cn/topic/22/3-1-eclipse)
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 of your project, then click on Build Model, and you'll see all of project. Select all of Project. Click Finish.
It is important to note that. This process may last for a few minutes, and Gradle will download the dependency.
Commonly encountered problems
Your eclipse's workspace cannot include the same directory as your project name.
Assume that an error such as the following occurs.
The workaround is to delete your Maven cache, which is generally stored in C:\users\username.m2 or/users/username/.m2 or/home/username/.m2.
When you import the first item to get an example of the following error:
com/github/jtakakura/gradle/plugins/robovm/robovmplugin:unsupported Major.minor version 51.0
The workaround is that the JDK version number must be 1.7 or higher.
Execute 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 to the real machine, or run as, iOS simulator in the 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 finished in the browser milk.
Package your App
After development, package your app.
(www.libgdx.cn All rights reserved, if need to reprint.) to indicate the source)
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
3.1. Eclipse