Create and run a libGDX project, and create a libgdx project.

Source: Internet
Author: User
Tags libgdx

Create and run a libGDX project, and create a libgdx project.

 

I recently studied libGDX and read some related tutorials, but the knowledge structure is messy. So I want to use this blog to record and sort out what I learned, and let myself continue to learn this.

This document describes how to create and run libgdx projects in widows.

1. Download libgdx

Download is relatively simple. Go to the libgdx official website, click Download on the top, and then click the Download Setup App button to Download it, as shown in:

2. Create a project

The above steps are downloaded to a jar package named gdx-setup. This jar package can help us easily create a project. The steps are as follows:

1, double-click Open gdx-setup.jar. If double-click cannot open, use the shortcut key win + r, then Enter cmd to enter the command line, enter to store the gdx-setup.jar directory, enter

java -jar gdx-setup.jar

For example:

2. If no accident exists, the Project Creation Interface window is displayed. Fill in the project information in this window. It is recommended that you do not use the default Destination (Project storage directory), which may cause project creation failure. In addition, you should use the latest AndroidSDK, some earlier sdk versions are not supported. Click the Advanced button to select the IDE for future project editing, and then click Generate to create the project. It is recommended that you do not disconnect the network during the creation process, which may lead to project failure. If everything goes well, a prompt is displayed, such:

3. Import the project

Here I am using the Eclipse development environment, and its import project is like other common projects: select File → Import → General → Existing Project into Workspace → Select root directory → Browser Select the storage path when the Project is created → Finish, as shown in the following steps:

4. Run the project

After the project is imported, the core and the project package corresponding to each platform (depending on the selection when creating the project) will appear in the PackageExplorer column, and then you can run the project on each platform.

1. Run the desktop project. Right-click the folder with the project desktop suffix → Run As → Java Application → select export toplauncher, for example:

2. When running the Android project, the Android version is often not found when running the Android project. In this case, you need to configure the Android version, for example:

The subsequent steps are as follows:

3. project running effect, such:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.