I got this msg "\cocos/platform/android/java ] fails!" when i run " ./android-build.py -p 10 cpp-tests"

I got this msg "\cocos/platform/android/java ] fails!" when i run " ./android-build.py -p 10 cpp-tests"
0

#1

When i try compile for win32 and web, everything goes ok. But when i try to compile to android i got this error:

[armeabi] Install : libcpp_tests.so => libs/armeabi/libcpp_tests.so
make.exe: Leaving directory C:/cocosalpha/tests/cpp-tests/proj.android' 'C:\Program'is not recognized as an internal command or external, operable program or batch file. update cocos lib-project [ C:\cocosalpha\build\..\cocos/platform/android/java ] fails! PS C:\cocosalpha\build> ./android-build.py -p 10 cpp-tests The Selected NDK toolchain version was 4.8 ! C:\NDK\ndk-build -j8 -C C:\cocosalpha\build\..\tests/cpp-tests/proj.android NDK_DEBUG=1 NDK_MODULE_PATH=C:\cocosalpha\bu ild\..;C:\cocosalpha\build\../external;C:\cocosalpha\build\../cocos Android NDK: WARNING:C:\cocosalpha\build\../cocos/./Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for stati c libraries Android NDK: WARNING:C:\cocosalpha\build\../cocos/platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is al ways ignored for static libraries make.exe: Entering directoryC:/cocosalpha/tests/cpp-tests/proj.android’
[armeabi] Install : libcpp_tests.so => libs/armeabi/libcpp_tests.so
make.exe: Leaving directory `C:/cocosalpha/tests/cpp-tests/proj.android’
‘C:\Program’ is not recognized as an internal command
or external, operable program or batch file.
update cocos lib-project [ C:\cocosalpha\build…\cocos/platform/android/java ] fails!

i’m posting versions of my tools
Ant:Apache Ant™ version 1.8.2 compiled on December 20 2010
JDK: 1.7.0_15
NDK:

id: 5 or “android-12”
Name: Android 3.1
Type: Platform
API level: 12
Revision: 3
Skins: WXGA (default)
ABIs : armeabi

id: 6 or “android-13”
Name: Android 3.2
Type: Platform
API level: 13
Revision: 1
Skins: WXGA (default)
ABIs : armeabi

id: 7 or “android-14”
Name: Android 4.0
Type: Platform
API level: 14
Revision: 3
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800
ABIs : no ABIs.

id: 8 or “android-15”
Name: Android 4.0.3
Type: Platform
API level: 15
Revision: 3
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800
ABIs : armeabi-v7a/

What should i do?


#2

I solved the problem.
The solution is:

  1. Put the android sdk into “C:\androidsdk”
  2. Set the environment variable of android_sdk_root to the new folder
  3. if you are using cocos2djs,do a copy of “…/frameworks\js-bindings\cocos2d-x\cocos/plataform” into
    “…/frameworks\js-bindings\cocos2d-x\cocos\2d”
  4. reexecute setup.py

I think, that if you put the directory of android_sdk_root between “” of environment variables , will work too, but i did not tried yet


#3

You make the wrong JDK path,or …just restart the computer,I solve this problem in this simple way