Is there Release mode for Android compile

Hi all is there a release mode for Android like Xcode schemer release debug mode is slow or is there no speed gain when compiling debug or release mode on android because it’s java.

“Edit:” Sorry without having to add a store or code encryption number thing .

Short answer: yes

Also, where are you getting Java from? It might be the native language for Android, but Cocos2d-x uses C++ which compiles with the NDK toolset.

'yep using NDK 9 and cocos 3,6. runs good but want a release mode with out having to install a key file to test on Device

command line on mac cocos run -p android

I’m not sure exactly what you want, but if you want to build for release from the command line.

Add

-m release

after this part

-p android

As far as I know, you need a keystore to compile in release mode.

Please also note that at least until 3.7 there is a problem with android release builds. These actually enable the COCOS2D_DEBUG define even in release builds - it does not (as it shouldn’t) for iOS builds. Having COCOS2D_DEBUG defined will leave a lot of debug stuff in your release builds and you do not want that.

Here is my thread about it: COCOS2D_DEBUG in release builds

1 Like