Optimize the size of the apk for Google Play Store

TheDakeTheDake Posts: 2Member
edited November 2020 in Exporting

Hello,

I want to put my apk on the play store but I have a warning on google play console that indicates the apk is not optimized (because some modules compiled are not used). It's not mandatory but it's a recommandation to have a good visibility.

Following this documentation (https://docs.godotengine.org/en/stable/development/compiling/optimizing_for_size.html) I did a custom template export with this configuration :

custom.py

use_thinlto = "yes"
disable_3d = "yes"
tools = "no"
debug_symbols = "yes"
pulseaudio = "no"
deprecated = "no"
minizip = "no"
module_cvtt_enabled = "no"
module_stb_vorbis_enabled = "no"
debug_symbols = "no"
module_visual_script_enabled = "no"
module_jpg_enabled = "no"
module_ogg_enabled = "no"
disable_advanced_gui = "yes"
module_arkit_enabled = "no"
module_assimp_enabled = "no"
module_bmp_enabled = "no"
module_bullet_enabled = "no"
module_camera_enabled = "no"
module_csg_enabled = "no"
module_dds_enabled = "no"
module_enet_enabled = "no"
module_etc_enabled = "no"
module_gdnative_enabled = "no"
module_gridmap_enabled = "no"
module_hdr_enabled = "no"
module_jsonrpc_enabled = "no"
module_mbedtls_enabled = "no"
module_mobile_vr_enabled = "no"
module_opensimplex_enabled = "no"
module_opus_enabled = "no"
module_pvr_enabled = "no"
module_recast_enabled = "no"
module_regex_enabled = "no"
module_squish_enabled = "no"
module_svg_enabled = "no"
module_tga_enabled = "no"
module_theora_enabled = "no"
module_tinyexr_enabled = "no"
module_upnp_enabled = "no"
module_vhacd_enabled = "no"
module_vorbis_enabled = "no"
module_webm_enabled = "no"
module_webp_enabled = "no"
module_webrtc_enabled = "no"
module_websocket_enabled = "no"
module_xatlas_unwrap_enabled = "no"

I use godot-3.2.2-stable source and the compilation with scons and template generation works well :

scons platform=android target=release
cd platform/android/java
./gradlew generateGodotTemplates

Then I move the bin release apk in the .local/share/godot/templates/3.2.2.stable as explained here (https://docs.godotengine.org/en/stable/development/compiling/compiling_for_android.html).

In the godot editor :

  • I specify the "Custom build sdk path" in editor menu
  • I remove folder android in the project app and install a new compilation android build in the project menu.
  • I specify "Use custom build" in export and set the path of release apk

I export the project, a console starts the gradle daemon, and the release game apk is well generated.

  • With official template my game apk has a size of 96.2 Mo
  • With my custom template my game apk has a size of 84 Mo

But google play console continue indicates that the apk is not optimized.

What are the settings to resolve this warning ?

Thank for your listening !


Tags :

Comments

  • TheDakeTheDake Posts: 2Member

    Could someone who has already used custom build models share its feedback ?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file