Help: cocos2d-x 3.0 alpha1 problem: execution failed

Help: cocos2d-x 3.0 alpha1 problem: execution failed
0.0 0


I created a cocos2d-x 3.0 alpha1 project on my Mac system(OS X 10.8.5). When executing ‘’, it prompts: ‘Couldn’t find the gcc toolchain’. In fact the gcc tool chain is installed on my computer properly. And I’ve already set the NDK_ROOT (it’s set to ‘/AndroidDev/ndk’ on my computer). By reviewing the ‘’ file, I find that the problem is caused by a Python statement ‘os.path.join(ndk_root,“toolchains/arm-linux-androideabi-4.8”)’. I use ‘print’ to get the result of this statement, the result is ‘/toolchains/arm-linux-androideabi-4.8’ instead of ‘/AndroidDev/ndk /toolchains/arm-linux-androideabi-4.8’ . Then, I test the following statement: print os.path.join(ndk_root,“ttt”), the result is ‘/tttroidDev/ndk’. Obviously, something is wrong with the function ‘os.path.join’, it replaces the characters in the first parameter by the characters in the second parameter instead of joining the two strings.
Who can give a solution to this case?

PS: Above test is on my physical Mac computer. When I run this case on a VM (virtual machine) with the same version of OS X, everything is fine.


A wild guess, but try setting NDK_ROOT to ‘/AndroidDev/ndk/’ (with an extra / at the end).


I tried this. But it doesn’t work either.


The problem is solved. It’s a ‘copy-paste’ problem. I delete the .bash_profile and create a new one. Then I type manually all the content in it. And then save. It works.