Why is raylib Release build for Android larger than Debug build? #4458
-
I built Raylib for Android using CMake and noticed a large size difference between debug and release builds. The Debug build is around 7 MB, while the Release build is 12 MB. Here’s the command I used:
Is it normal for the Release build to be nearly twice the size of the Debug build? Any tips on reducing the release build size? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
@OussamaTeyib Wait, is that a working cmake command for cross compiling to android? |
Beta Was this translation helpful? Give feedback.
-
For Android, you should use |
Beta Was this translation helpful? Give feedback.
For Android, you should use
MinSizeRel
instead ofRelease
. However, the NDK's CMake toolchain always includes debug symbols in all build variants, which is why your release build ends up being large. You should ensure that your packaging tools strip these symbols from the libraries before including them in the APK (AGP do this by default).