Cocos2d-js windows under construction and common problem solving

Source: Internet
Author: User

(Small white one, in order to build JS environment, tried many times (are tears), in this record their own construction process, the required documents at the low end of my success with the file share)I. Installation (construction of the environment)1, Python: "1" official online said does not support more than 3 version, so install the 2.7.X version of the bar "2" Add python to the environment variable "3" in the path of the input Python, installation success such as:

2, JDK "1" Download JDK installation, installation path do not use space or Chinese, personal suggestions download version 7. (The individual started with 8, an error occurred in the configuration, changed to 7 in order to become lost) "2" Add environment variable:to create a new variable in a system variable:JAVA_HOME:G:\JAVA\JDK (This path is the path of my personal jdk)in Path, add:%java_home%/bin (Note each variable in path; good separation)
"2" in cmd Input: java-version and javac-version test, appear as successful:    

2, SDK "1" Download SDK, extract to the specified directory "2" Add environment variable: New variable: android_sdk_root:g:\adt-bundle-windows-x86_64-20140702\ SDK (the JDK directory where the secondary path is the JDK's decompression path)
Path Add Variable:%android_sdk_root%\tools

3, NDK: "1" Download DNK, extract to the specified directory "2" Add environment variable: New variable: ndk_root:g:\android-ndk-r10b (This is the NDK's extract directory)
Path Add Variable:%ndk_root%

4, Ant: "1" Download Apache ant, extract to the specified directory "2" Add environment variable: Interstellar variable: ant_root:g:\apache-ant-1.9.4\bin (note to specify to the bin directory)
Add variable to path:%ant_root%
"3" cmd input ant-version, appears as successful:

4, COCOS2D-JS Installation: "1" Download Cocos2d-js engine package, extract to the specified directory under the "2" running engine directory setup.py; If the above environment is set up successfully, the runtime will flash through "3" after the run completes, the environment variable is opened, which appears in the user variable as:
"3" Copy the variable shown above into the system variable and add the variable for path accordingly
5, environmental success or not test: new and packaged apk "1" NEW: cmd run: Cocos New-l JS, such as
"2" pack apk test: Run cmd in the project directory, enter: Cocos compile-p android (The first pack will be slow, slow, slow), successful as:
Successful or a corresponding apk in the Runtime\android directory
second, may encounter the problem:1, run Cocos run-p web is error: FIX: Under ***\cocos2d-js-v3.1\tools\cocos2d-console\bin cocos.py file add: Import sysreload (SYS) Sys.setdefaultencoding (' GB18030 ') after adding
2, in the environmental construction will use a variety of problems, the most likely will be the version of the various tools caused by the problem, in the next analysis of my successful construction of the files used: Http://pan.baidu.com/s/1ntBP4yl



From for notes (Wiz)

Cocos2d-js windows under construction and common problem solving

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.