I have been studying the project for more than one hour.
First, you have to install vc2012 and download and unzip the cocos2d-x 3.0 official version, if not installed, please read my previous article.
Next we will download the android sdk and the ndk door: Click to open the link
Ant door: Click to open the link
After everything is ready, open setup. py in the cocos2d-x directory, enter the path as prompted, and restart your computer.
OK. Next, go to the topic
Enter cmd to open the console,
Enter cd your extract directory/cocos2d-x-3.0/tools/cocos2d-console/bin
Enter cocos new-p xxx. xxx. xxx-l cpp-d xxx
Explain
-P PACKAGE_NAME: package name
-L {cpp, lua, js} language
-D DIRECTORY Project SAVE path
-T TEMPLATE_NAME: Template Name
In this way, you can create your project under the saved path!
I wrote a bat to facilitate generation and share it with you.
1. Create a text file and paste the following content to it (you can write your own path name)
@ Echo off
D:
Cd D: cocos2d-x \ cocos2d-x-3.0 \ tools \ cocos2d-console \ bin
Set/p var1 = enter the project name (mygame ):
Set/p var2 = enter the package name (game. name. ver ):
Cocos new-p % var2 %-l cpp-d: \ cocos2d-x \ cocos2d-x-3.0 \ % var1 %
Pause
2. Save and change the txt suffix to bat.
OK!