# [Resolved]About Cocos2d-JS v3.0 alpha compile Android.

[Resolved]About Cocos2d-JS v3.0 alpha compile Android.
0.0 0

#1

When I compile the android platform,if was show “Error running command, return code: 2”!!

Trying few time also same,how I i solve it?
Attached is error screenshot download from official & one is GitHub Repo.

Env:
Windows 8.1 X64
Cygwin64
Python2.7

2014-03-17_021903.png (29.1 KB)

Deploy APK problem
#2

Thanks for feedback.

We’ll test and fix it soon.

#3

@Seika
I just took a look at the errors.
I’ve no idea about the first one (can’t find header files). And I will take a test about it later.

About the second error on github repo. I think the reason is : The path of your android SDK contains space.
Now cocos2d-console doesn’t support tools path contains space. And maybe we will implement it later.
So, by now you can change your android SDK path, make sure it’s not contains space.

Another suggestion: Now Cygwin is not required by cocos2d-console on windows. You can invoke command `cocos` in command line directly. (Our development & tests all based command line, but not Cygwin)

After all, thanks for your feedback!

#7

@Seika
I just took a test on Cocos2d-JS-v3.0-alpha. I run cocos in command line, but not Cygwin. And I found everything is well.
My test steps:
1. Run command line into console path : `cd ..../Cocos2d-JS-v3.0-alpha/tools/cocos2d-console/bin`
2. Create JS project by command :`cocos new -l js MyTest`
3. Run the project on android by command : `cocos run -s ./MyTest -p android`

I think you can take a try of using command line.

#8

@zhangbin wrote:

@Seika
I just took a look at the errors.
I’ve no idea about the first one (can’t find header files). And I will take a test about it later.

About the second error on github repo. I think the reason is : The path of your android SDK contains space.
Now cocos2d-console doesn’t support tools path contains space. And maybe we will implement it later.
So, by now you can change your android SDK path, make sure it’s not contains space.

Another suggestion: Now Cygwin is not required by cocos2d-console on windows. You can invoke command `cocos` in command line directly. (Our development & tests all based command line, but not Cygwin)

After all, thanks for your feedback!

@zhangbin wrote:

@Seika
I just took a test on Cocos2d-JS-v3.0-alpha. I run cocos in command line, but not Cygwin. And I found everything is well.
My test steps:

1. Run command line into console path : `cd ..../Cocos2d-JS-v3.0-alpha/tools/cocos2d-console/bin`
2. Create JS project by command :`cocos new -l js MyTest`
3. Run the project on android by command : `cocos run -s ./MyTest -p android`

I think you can take a try of using command line.

Yea,my SDK patch contain space,later I will test without space & using CMD to deploy it to see still have error or not.

#9

Hi,

Just now re-testing it,now it will normal compile for a while,then appear the ANT command error,may I know problem? Below is my ANT System variable.

ANT_ROOT: C:\apache-ant-1.9.3
PATH: C:\cygwin64;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Java\jdk1.7.0_51\lib;C:\AndroidSDK\tools;C:\cygwin64\bin;C:\AndroidSDK\platform-tools;C:\apache-ant-1.9.3\bin;C:\apache-ant-1.9.3\lib;

#10

@Seika wrote:

ANT_ROOT: C:\apache-ant-1.9.3
PATH: C:\cygwin64;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Java\jdk1.7.0_51\lib;C:\AndroidSDK\tools;C:\cygwin64\bin;C:\AndroidSDK\platform-tools;C:\apache-ant-1.9.3\bin;C:\apache-ant-1.9.3\lib;

Change ANT_ROOT to `ANT_ROOT: C:\apache-ant-1.9.3\bin`
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8076725602149963, "perplexity": 9628.85152490205}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-13/segments/1521257647681.81/warc/CC-MAIN-20180321180325-20180321200325-00091.warc.gz"}