1. tools to install the development environment:
A. Visual Studio 2012
B. cocos2d-x-3.3 version
C. Java JDK 1.7
D. Android SDK
E. Android NDK
2. Download Visual Studio 2012 and install (for: https://msdn.microsoft.com/library/dd831853 (v=vs.110). aspx)
3. Download the cocos2d-x-3.3 version of the game engine
Users can log on to the Cocos2d-x website to download the Cocos2d-x engine version of the 3.x series (for: http://cn.cocos2d-x.org/download/) as shown in:
This guide will take the current newer stable version of Cocos2d-x 3.3 final engine as an example, it is strongly recommended to use the new version of COCOS2DX, the new engine has a lot of features, fixed the old version of many bugs.
After the download is complete, the extracted parent folder is placed in the specified location, where I save the location as: C:\work\study\cocos2dx\version, open the cocos2d-x-3.3 folder with the directory structure as shown:
which
1) Build: used primarily to build project solutions
2) CMake: Used to store modules, to find the corresponding resources, such as files, audio and so on
3) Cocos: The API used to store cocos2d-x
4) Docs: Document Description
5) Extensions: used to store some extended class libraries, such as GUI controls
6) external: For storing some physics engines such as box2d, Chipmunk and Convertutf, etc.
7) Licenses: Storage of all dependent Works license statement
8) Plugin: Provide some plugins
9) Projects: I create my own new project directory for the creation of the Cocos2d-x project
Templates: Contains templates for creating Cocos2d-x projects under different platform Ides
One) test: Store the test project
Tools: To store some of the tool that needs to be used, such as creating a project Python script
Go to the Build folder, double-click the Cocos2d-win32.vc2012.sln file, you will start visual Studio 2012 and see a solution in VS, as follows:
The architecture diagram for Cocos2d-x is as follows:
4. Download and install the configuration Java JDK 1.7
Because we are developing for Android, we need to install Java JDK (for: http://www.oracle.com/technetwork/java/javase/downloads/index.html)
After the download completes double-click the. exe file, note that it is best not to install it in a space or Chinese folder, other restrictions, note its installation path, the local installation path is : C:\Installed\Java, also need to configure environment variables.
After the environment variable configuration is complete, click Start, run, enter cmd command, and in the DOS window, enter: Java–version. The following interface appears to indicate successful installation:
5. Configuring the Android SDK Environment
Download Android SDK (for: http://developer.android.com/sdk/index.html) and ADT plugin (can be installed online or offline)
After the download is complete, unzip the Adt-bundle-windows-x86_64-20131030.zip file into a directory where the directory is: C:\Installed\Android, which contains the Eclipse, SDK folder and SDKManager.exe files.
Double-click Eclipse.exe under the Eclipse folder to set the default work area (workspace).
Configuring the SDK environment variable ANDROID_SDK
Install the ADT plugin and select the menu item "Help" and "Install Newsoftware ..." In Eclipse as follows:
Click "Add" to add Repository:
Of course you can also archive to local for offline installation.
Click "Start" - "Run" and "Enter cmd command", enter: Adb–h in the DOS window. If the following interface appears, the installation is successful:
6. Configuring the Android NDK Environment
Download Android NDK (for: http://developer.android.com/tools/sdk/ndk/index.html), unzip and place in a directory after the download is complete, here is the location: C:\Installed\ Android\adt-bundle-windows-x86_64-20131030, and set environment variables: Ndk_root. Its directory structure is as follows:
7. Configuring the Python Environment
Download Python (for: https://www.python.org/), and then double-click the python-2.7.9.amd64.msi file to install Python after the download is complete.
Click Start, run, enter cmd command, and in the DOS window, type: Python. If the following interface appears, the installation is successful:
8. Create a cocos2d-x project
Before creating the Cocos2d-x project, if the previously mentioned environment variable is not configured, you can go to the root of cocos2d-x-3.3, double-click setup.py, and set the environment in advance.
After the environment is configured, go to the directory: Cocos2d-x-3.3/tools/cocos2d-console/bin, open the DOS window terminal, run the cocos.py script to create the project:
Python cocos.py new second_cocoscom.hp.game-l cpp-d C:\work\study\cocos2dx\version\cocos2d-x-3.3\projects
Parameter description:
A. Second_cocos for the project name
B.–p after the package name, with a minimum of three levels
C.–l after the development of the language, there are CPP, LUA and JS three types
D.–d after the project storage directory
The project structure under the C:\work\study\cocos2dx\version\cocos2d-x-3.3\projects directory is:
9. build Android project files
In the new Second_cocos project, execute the build_native.py script under the Proj.android directory to compile and generate the libcocos2dcpp.so file in the Libs/armeabi directory.
10. Import Android Project
Launch Eclipse IDE, import Android Project
A. Right-click on "Packageexplorer" and select "Import ..."
B. When the dialog box appears, select "Exsiting Android Projectinto Workspace" (Import an existing Android project into the workspace)
The results are as follows:
The environment is now complete.
Where the document is: http://download.csdn.net/detail/shenjichao2008/8439741
How to build an Android cocos2d-x-3.3 development environment on Win7