Androidstudio Integrated COCOS2D-X Development environment construction

Source: Internet
Author: User

"1" https://www.python.org/downloads/download python2.7.13 version.

After the download is an MSI file, directly double-click the installation, remember to tick the automatic add environment variable.

"2" If there is a 3.* version, you can use 360 unloading, testing,

"3" When installing, tick

"4" Test

"5" http://ant.apache.org/bindownload.cgi download ant, download and extract to any folder, as long as the easy to find on the line,

"6" My ant is in a local location,

"7" Install Android Studio

Download https://developer.android.com/studio/index.html

Path configuration C:\Program files\android\android Studio

C:\Users\Administrator\AppData\Local\Android\sdk

When the last boot, do not import the previous settings just fine, all the way to the default next,ok!

"8" Build Android NDK development environment, Https://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip

"9" unzip the NDK zip package, note that the path directory does not appear spaces and Chinese,

"10" in fact, starting from Android studio2.2, the official recommendation is to use CMake to build the local code, before the build, need to install three dependencies: NDK CMake lldb

"11" Tick These three options,

"12" and then download it,

After the "13" installation is complete,

"14" Test NDK's work, another technical document detailed memo!

"15" Download cocos2d-x, I download is cocos2d-x 3.15.1 version, URL http://www.cocos2d-x.org/filedown/cocos2d-x-3.15.1.zip after decompression

"16" Find setup.py, right click to get administrative rights, and then double-click Open,

"17" can be found in the C:\Users\Administrator\AppData\Local\Android\sdk\ndk-bundle location of the NDK installed,

"18" Drag the path to the console panel opened above, press ENTER,

"19" Drag the path of the Android Sdkroot into the console panel,

"20" sets the path to ant by locating the path of ant and dragging it in,

"21" After the return, the interface will turn off itself! You can test: if you double-click setup.py, the interface will flash over and disappear, indicating that it has been configured successfully!

"22" Start building the project with Cocos2d-x, open the Command Window (cmd), enter:

Cocos New Demo-p com. Lyf.meow-l Cpp-dd:\47.91.248.233\lvyunfei\2017_0908_1129_cocos2d_demo

Parameter Description: Demo for Project name

-P Follow-up package name

-L followed by the development language type, you can choose Cpp,lua or JS

-D back to the address where the item is stored, the path is arbitrary

"23"

"24" Enter when the project is completed,

"25" To view the directory, build successfully,

"26" Start compiling, compiling: command line into the path of your project, and then enter: Cocos compile-p Android--android-studio

And wait for a while to finish

"27" found an error,

"28" direct enter, try again, discover or fail! Use

Cocos compile-p Android--android-studio--ap android-25 One More time,

Find or not, failure! Or back to the previous command, no version number

"29" In this case, directly into the project with Androidstudio,

The directory structure after the "30" Import is complete,

"31" Now start configuring the NDK compilation, check the menu bar of Run, Edit configurations

"32"

"33" Sets the compilation tool and the Compile command,

"34" To adjust the compilation order, priority to use our compilation tool,

"35" and start compiling apk! Still going wrong, finally finding a solution on the internet,

"36" Https://stackoverflow.com/questions/44756726/cant-compile-android-cocos2d-file-android-studio

"37" To modify these two places, and then recompile the APK, it succeeded,

"38" Open the computer file system, view apk!

"39" After the installation has been tested, you can run OK

Androidstudio Integrated COCOS2D-X Development environment construction

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.