COCOS2D_DEBUG in release builds

COCOS2D_DEBUG in release builds
0

I have noticed that building the app in release mode (cocos run -p android -j 4 -m release) does in fact leave COCOS2D_DEBUG defined. This is a problem in my code because COCOS2D_DEBUG should only be defined for debug builds, to leave out test code etc from release builds… where can this be fixed?

This behaviour of Android builds is also INCONSISTENT with iOS builds and should definitely be fixed.

Here is something related: http://qiita.com/asuuma/items/7a7a21666272e7c44087

1 Like

Maybe I should ask like this; why is COCOS2D_DEBUG enabled for RELEASE builds for Android?? Maybe it makes the compiling faster while developing?

1 Like

Yes, this is definitely an issue. Any hints on how to enable/disable COCOS2D_DEBUG for release builds without having to manually touch the proj.android/jni/Application.mk file each time we change the deploy target?

1 Like

This is still a issue, just opened a issue for it https://github.com/cocos2d/cocos2d-x/issues/19787

Which cocos2d version?
I remember it was fixed

1 Like

It is in 3.17.2

1 Like