Issues with APK size
Asked Answered
D

6

0

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.

Disservice answered 23/5, 2023 at 16:53 Comment(0)
M
0

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.

Mahone answered 23/5, 2023 at 18:3 Comment(0)
F
0

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.

Fled answered 24/5, 2023 at 9:42 Comment(0)
D
0

Fled

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.

Disservice answered 24/5, 2023 at 11:53 Comment(0)
D
0

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

Disservice answered 24/5, 2023 at 23:20 Comment(0)
F
0

Disservice Great for you, it would be nice to share what you have found please.

Fled answered 25/5, 2023 at 7:16 Comment(0)
B
0

Disservice Dude, I have the same problem as you.how did you solve it.

Bicameral answered 14/11, 2023 at 17:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.