export COCOS2DX_ROOT=/Users/bpmacmini01/Documents/cocos2d-2.1rc0-x-2.1.2/ export NDK_ROOT=/Users/bpmacmini01/Documents/AndroidDevelop/ndk-r9d export ANDROID_NDK_ROOT=/Users/bpmacmini01/Documents/AndroidDevelop/ndk-r9d export ANDROID_SDK_ROOT=/Applications/adt/sdk export PATH=$ANDROID_NDK_ROOT:$PATH export PATH=$ANDROID_SDK_ROOT:$PATH
基本路径就是上面的了,这里进行这个操作,只是想让你看下我的配置路径。然后,在终端中输入sdk 的路径
cd /Applications/adt/sdk/platform-tools
之后,只用输入
./adb logcat | ndk-stack -sym ./obj/local/armeabi当运行安卓应用时,如果是c++的错误,就会在终端中提示错误的文件及行数,方便c++调试。 原文链接:https://www.f2er.com/cocos2dx/343964.html