安卓下cclog无调试信息

环境:win7 64, cocos2d 3.2


  1. bool AppDelegate::applicationDidFinishLaunching() {
  2. // initialize director
  3. auto director = Director::getInstance();
  4. auto glview = director->getOpenGLView();
  5. if(!glview) {
  6. glview = GLView::createWithRect("My Game",Rect(0,0,480,700));
  7. director->setOpenGLView(glview);
  8. }
  9. glview->setDesignResolutionSize(480,640,ResolutionPolicy::EXACT_FIT);
  10. CCLOGERROR("can debug================ "
  11. "gogogogogoggggggggggggggggggggggggggggggg"
  12. "ggggggggggggg===============================================================");
android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CPPFLAGS += -DCOCOS2D_DEBUG=1

application.mk:
#APP_DEBUG := $(strip $(NDK_DEBUG))
#ifeq ($(APP_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
#else
# APP_CPPFLAGS += -DNDEBUG
# APP_OPTIM := release
#endif

eclips build commond:
python ${ProjDirPath}/build_native.py -b debug

eclips 下选择debug as->application来载入手机运行,在eclips下的LogCat能看到其它的系统打印信息。

弄了一天了,求大神帮忙。