I created a cocos2d-x 3.0 alpha1 project on my Mac system(OS X 10.8.5). When executing ‘Build_Native.py’, 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 ‘Build_Native.py’ 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.