I have created a simple project with 3 buttons and some texts. I have added AdMob (for testing) and installed Android Build Template in the project folder, and exported the project using Gradle setting. And the resulting size is 125 MB!!! I have searched for solutions in internet and tried inserting custom.py with the following code into the project root:

custom.py
tools=no
deprecated=no
minizip=no
xml=no
builtin_glew=no
builtin_libmpcdec=no
disable_3d=yes
disable_advanced_gui=yes
builtin_openssl=no
module_openssl_enabled=no
builtin_libogg=no
builtin_libtheora=no
builtin_libvorbis=no
builtin_opus=no
builtin_speex=no
builtin_squish=no
builtin_zlib=no
module_chibi_enabled=no
module_cscript_enabled=no
module_dds_enabled=no
module_etc1_enabled=no
module_gridmap_enabled=no
module_ik_enabled=no
module_jpg_enabled=no
module_mpc_enabled=no
module_ogg_enabled=no
module_opus_enabled=no
module_pbm_enabled=no
module_pvr_enabled=no
module_speex_enabled=no
module_squish_enabled=no
module_theora_enabled=no
module_vorbis_enabled=no

However, this did not help. I would appreciate any advice. I want to reduce the size to 10-15 MB, if possible.

If you're on Windows, you could "zip up" the file using something like Winzip to make it smaller, but even that won't make much difference, it'll still make for quite a big file.

There is this reddit thread which provide a lead on the size issue (looks like you already know more or less of it, still your file use yes/no pseudo boolean as-is whereas in doc, they are surrounded by quotes, have you checked your file has been processed successfully ?)

Which version of Godot 4 did you use ? They're releases pretty often so from one to another, some new features or new issues could "popped-up" and have some effect in this matter.

You may consider checking opened issues and maybe fill a discussion and/or an issue on the official Godot engine repository as well as check for generic Android tool to optimize app package size, and also the building process (like get the commands uses and their parameters, check and add some, use better/other tools which can do the same job if they're any)

10-15 MB looks to be more a dream than anything actually reachable to me, not with some comprehensive engine like Godot or any framework which simplify the code, I never seen such small app yet.

    JusTiCe8

    they are surrounded by quotes

    Forum removed my quotation marks.

    Which version of Godot 4 did you use ?

    4.0.2.

    You may consider checking opened issues and maybe fill a discussion and/or an issue on the official Godot engine repository as well as check for generic Android tool to optimize app package size, and also the building process (like get the commands uses and their parameters, check and add some, use better/other tools which can do the same job if they're any)

    I am able to slightly reduce the size (down to 24 MB) if I build without Gradle, but as soon as I build with Gradle, the size increases to 125 MB... It`s a problem.

    I did it, spent the whole day, but I learned. My result is 12 MB. Thank you all.

      6 months later