既包含了已经消失了的老板本"cocos"软件相关的配置,也包含当时最新的cocos2d-x-3.11引擎包的相关配置
支持把cocos引擎相关代码预编译出库文件存放到prebuilt目录,让项目可直接引用,无需每次都重复编译引擎相关
# environment about android export NDK_ROOT=/Users/jiading/Documents/soft/android-ndk-r10e export ANDROID_SDK_ROOT=/Users/jiading/Library/Android/sdk # android sdk 让命令行输入android或android sdk可开启sdk manager export PATH=${PATH}:/Users/jiading/Library/Android/sdk/tools # Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x export COCOS_CONSOLE_ROOT=/Applications/Cocos/frameworks/cocos2d-x-3.11.1/tools/cocos2d-console/bin export PATH=$COCOS_CONSOLE_ROOT:$PATH export COCOS_X_ROOT=/Applications/Cocos/frameworks export PATH=$COCOS_X_ROOT:$PATH # Add environment variable COCOS_FRAMEWORKS for cocos2d-x export COCOS_FRAMEWORKS=/Applications/Cocos/frameworks export PATH=$COCOS_FRAMEWORKS:$PATH # Add environment variable ANT_ROOT for cocos2d-x export ANT_ROOT=/Applications/Cocos/tools/ant/bin export PATH=$ANT_ROOT:$PATH # adb export PATH=${PATH}:/Users/jiading/Library/Android/sdk/platform-tools # ndk-build export PATH=${PATH}:/Users/jiading/Documents/soft/android-ndk-r10e
要注意的是如果使用了最新版本android sdk tools,那么上面的android命令在终端里输入之后回提示已经被禁用之类的,而且很有可能你的unity项目打包android回失败,可看我另一篇帖子:'http://www.cnblogs.com/JD85/p/6895649.html',原因就是最新的sdk tools去掉了一些命令,对于当前unity项目还是建议用老版本的sdk tools,cocos项目还未测试,不知道cocos creater和cocos2d-x是否都支持最新的android sdk tools。