Cocos2d-x 3.2 Android Platform Novice Development Environment Configuration tutorial

Source: Internet
Author: User

Reference: http://www.cocoachina.com/cocos/20140529/8596.html

The following reference to the development environment configuration in Cocoachina Tutorial http://www.cocoachina.com/cocos/20140529/8596.html, I feel that the configuration process, not very detailed, in this blog based on the improvement of HA , what is the problem, you can message exchange.


Some time ago, after learning Android development, think about doing fun games to play, now learn Cocos2d-x 3.2, want to know Ha, this game engine ...

The first step of learning, of course, is to configure the development environment, or dry a bird ...

I. General preparatory work
1, install Cocos2d-x 3.2Download it on the COCOS2D official website and unzip it after downloading. 2. Install Eclipse and Android SDK EclipseDownload it on its website. Android SDK is available for download at Android Developer Center. Eclipse is the IDE you need to develop Android. This is a very good IDE, there are a lot of plugins to make him become three heads. To develop Android programs, you need to download the relevant plug-ins, but if each plugin to configure themselves, it will be very painful things. If you are a novice, it is recommended to use: ADT Bundle. This is the Eclipse+android SDK, and all the projects have been configured for you. It is best to use ADT.
3. Installing the JDKEclipse requires a Java environment to run. If the Java environment is not installed beforehand, an error will be given. In general, environment variables are automatically configured after installation. If you haven't solved the problem, find out more about the JDK installation on your network. 4. Installing the CDT pluginThis is an Eclipse plug-in to support the development of the C + + language in Eclipse. Download from Eclipse's official website, after downloading, copy the contents of features and Plusins folders to the corresponding folder in the Ecplise installation directory. 5, installation ndk-r9dThis is a necessary tool for mixed compilation of C + + and Java. Make a note of the directory that was extracted after the download, as it will be used in subsequent installations. 6, installation ANT-1.9.4Cocos Android Development needs to use it, so download it and install it. 7. Configure Environment Variables






Second, the PC environment configuration process 1, installation VS2012There are many other things on the internet.contribute 3 activation serial numbers:
Ykcw6-bpfpf-bt8c9-7dcth-qxgwc
Rbcxf-cvbgr-382mk-dfhj4-c69g8
YKCW6-BPFPF-BT8C9-7DCTH-QXGWC
2. Install Python 2.7.6The installer for Cocos2d-x is written in Phthon, so this software is required. Do not download the version above python3.0, otherwise the operation will be wrong. If it's a Mac, then you're born with it.

3, the development environment configurationOnce the above work has been completed, it can be configured. Start the Windows command-line (CMD) tool. Enter the installation directory for Cocos2d-x 3.2 to perform:
 
   
  
  1. Python setup.py
Cocos2d-x version 3.2 uses this setup.py to install, very convenient. After execution, you will be configured to install the ANT, NDK, SDK, and so on, where you can install it and enter it.
4. Build Your own projectWith setup.py configured cocos2d-x environment, your command line will be more like "cocos" command, the new project will use this command. Example:
  
 
    1. < Span style= "margin:0px; padding:0px; border:0px; Background-color:inherit ">COCOS&NBSP; new   Hello (project name)-p com.hello (package name)-l cpp (project type)  -d e:\mycocos\cocos2d (catalog)  
The new project will copy all the source files and libraries to your project directory. So the new project file will be very large, there are many people doubt the necessity of this, but in your development later will know that this configuration method is right. Once the project is established, you can develop: A, the development of VS2012. Find your project directory under: Proj.win32, open the solution on the line. The rest is your mission. In general, you can run it directly.in general, in the VS2012 project development, compilation, commissioning, and then transplanted to the mobile phone platform. B, the development of Android. Use the project import in Eclipse to import the project schema in Proj.android. After importing, because of problems with the SDK, it is generally unable to start. Here to focus on Kazakhstan: 1, under the Project catalogue for VS2012 projects, for example (E:\COCOS2D\MYTEST\COCOS2D\COCOS\PLATFORM\ANDROID\JAVA\SRC) with XXXX\mytest\cocos2d\ The org directory in COCOS\PLATFORM\ANDROID\JAVA\SRC overwrites the Org directory in E:\COCOS2D\MYTEST\PROJ.ANDROID\SRC. (Solve the problem of Android project error) 2,windows cmd terminal, enter the following command to compile the project compile time is a bit long, wait a minute. when the compilation is complete, build libcocos2dcpp.so in ADT, refresh, you can see the
3, use the real machine to run the project (I started with the simulator run, the app is always abnormally terminated, and later in the real machine does not have this situation).

Cocos2d-x 3.2 Android Platform Novice Development Environment Configuration tutorial

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.