Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release apk export missing icons and splashes #50623

Closed
noidexe opened this issue Jul 19, 2021 · 6 comments · Fixed by #50665
Closed

Release apk export missing icons and splashes #50623

noidexe opened this issue Jul 19, 2021 · 6 comments · Fixed by #50665

Comments

@noidexe
Copy link
Contributor

noidexe commented Jul 19, 2021

Godot version

3.4.beta1.official

System information

Windows 10, GLES 3, GTX 2060

Issue description

Apks in release mode lack custom icons and splashes. It works well when doing debug exports.
Here's a comparison of the res folder in both apk (release on the left, debug on the right).
Update: the directory structure seems unrelated to the error. When building the APK on release mode using the Androd Build Template all icons and splashes are exported correctly

image

Workaround: Install Android Build Template and select "Custom Build" in export settings

Steps to reproduce

Export debug and release apks

Minimal reproduction project

Icon and Splash Missing.zip

@Calinou
Copy link
Member

Calinou commented Jul 19, 2021

@noidexe Please upload a minimal reproduction project to make this easier to troubleshoot.

Also, are you using the old APK-based way to export a project, or the new custom build/AAB-based way?

@noidexe
Copy link
Contributor Author

noidexe commented Jul 19, 2021

Added an empty project with the icon and slashes, and a fresh signing key generated just as explained in the docs.

I'm using the old APK-based way (the current default AFAIK).

Here's a verbose log of a debug and release export. See the weird filenames when exporting as release:

Godot Engine v3.4.beta1.official - https://godotengine.org
Using GLES3 video driver
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
OpenGL ES Batching: ON
	OPTIONS
	max_join_item_commands 16
	colored_vertex_format_threshold 0.25
	batch_buffer_size 16384
	light_scissor_area_threshold 1
	item_reordering_lookahead 4
	light_max_join_items 32
	single_rect_fallback False
	debug_flash False
	diagnose_frame False
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 1962 calculated latency: 44ms
 
CORE API HASH: 11082391773531340769
EDITOR API HASH: 18297553895177722823
Loading resource: C:/Users/lisan/AppData/Roaming/Godot/editor_settings-3.tres
EditorSettings: Load OK!
Project is missing: E:/Users/lisan/Documents/PROFESOR/template_parcial_1/ShootingGallery/src/project.godot
Project is missing: C:/Users/lisan/Documents/ALUMNOS/ARTE-TT/Final Guerra Almendra Santini/trabajo-final_Guerra_Almendra_Santini/trabajo-final/src/project.godot
Project is missing: C:/Users/lisan/Documents/GitHub/mad-math-game/MadMathGame/project.godot
Loaded builtin certs
Editing project: C:/Users/lisan/Documents/Icon and Splash Missing (C:::Users::lisan::Documents::Icon and Splash Missing)
Godot Engine v3.4.beta1.official - https://godotengine.org
EditorSettings: Save OK!
Using GLES3 video driver
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
OpenGL ES Batching: ON
	OPTIONS
	max_join_item_commands 16
	colored_vertex_format_threshold 0.25
	batch_buffer_size 16384
	light_scissor_area_threshold 1
	item_reordering_lookahead 4
	light_max_join_items 32
	single_rect_fallback False
	debug_flash False
	diagnose_frame False
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 1962 calculated latency: 44ms
 
CORE API HASH: 11082391773531340769
EDITOR API HASH: 18297553895177722823
Loading resource: res://default_env.tres
Construct gdnative interface

Destruct gdnative interface

Class 'BulletPhysicsDirectBodyState' is not exposed, skipping.
Class 'BulletPhysicsDirectSpaceState' is not exposed, skipping.
Class 'BulletPhysicsServer' is not exposed, skipping.
Class 'GDScriptNativeClass' is not exposed, skipping.
Class 'IP_Unix' is not exposed, skipping.
Class 'InputDefault' is not exposed, skipping.
Class 'Physics2DDirectBodyStateSW' is not exposed, skipping.
Class 'Physics2DDirectSpaceStateSW' is not exposed, skipping.
Class 'Physics2DServerSW' is not exposed, skipping.
Class 'ResourceImporterMP3' is not exposed, skipping.
Class 'ResourceImporterOGGVorbis' is not exposed, skipping.
Loading resource: C:/Users/lisan/AppData/Roaming/Godot/editor_settings-3.tres
EditorSettings: Load OK!
Loaded builtin certs
EditorSettings: Save OK!
Exporting for Android...
- debug build: true
- export path: C:/Users/lisan/Documents/Icon and Splash Missing/export/Icon and Splash Missing.apk
- export format: 0
- sign build: true
- custom build enabled: false
- apk expansion enabled: false
- enabled abis: armeabi-v7a,arm64-v8a
- export filter: 0
- include filter: 
- exclude filter: 
Loading splash image: res://splash.png
Creating splash background color image.
Loading regular icon from 
- falling back to project icon: res://icon.png
Loading adaptive foreground icon from 
- falling back to using the regular icon
0 param: --xr_mode_regular
1 param: --use_depth_32
2 param: --use_immersive
Starting legacy build system..
ADDING: classes.dex
ADDING: lib/arm64-v8a/libc++_shared.so
ADDING: lib/arm64-v8a/libgodot_android.so
ADDING: lib/armeabi-v7a/libc++_shared.so
ADDING: lib/armeabi-v7a/libgodot_android.so
ADDING: kotlin/annotation/annotation.kotlin_builtins
ADDING: kotlin/collections/collections.kotlin_builtins
ADDING: kotlin/coroutines/coroutines.kotlin_builtins
ADDING: kotlin/internal/internal.kotlin_builtins
ADDING: kotlin/kotlin.kotlin_builtins
ADDING: kotlin/ranges/ranges.kotlin_builtins
ADDING: kotlin/reflect/reflect.kotlin_builtins
ADDING: AndroidManifest.xml
ADDING: res/drawable-hdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable-mdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable-nodpi-v4/splash.png
ADDING: res/drawable-nodpi-v4/splash_bg_color.png
ADDING: res/drawable-v21/notification_action_background.xml
ADDING: res/drawable-xhdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable/notification_bg.xml
ADDING: res/drawable/notification_bg_low.xml
ADDING: res/drawable/notification_icon_background.xml
ADDING: res/drawable/notification_tile_bg.xml
ADDING: res/drawable/splash_drawable.xml
ADDING: res/layout-v16/notification_template_custom_big.xml
ADDING: res/layout-v21/notification_action.xml
ADDING: res/layout-v21/notification_action_tombstone.xml
ADDING: res/layout-v21/notification_template_custom_big.xml
ADDING: res/layout-v21/notification_template_icon_group.xml
ADDING: res/layout/downloading_expansion.xml
ADDING: res/layout/godot_app_layout.xml
ADDING: res/layout/notification_action.xml
ADDING: res/layout/notification_action_tombstone.xml
ADDING: res/layout/notification_media_action.xml
ADDING: res/layout/notification_media_cancel_action.xml
ADDING: res/layout/notification_template_big_media.xml
ADDING: res/layout/notification_template_big_media_custom.xml
ADDING: res/layout/notification_template_big_media_narrow.xml
ADDING: res/layout/notification_template_big_media_narrow_custom.xml
ADDING: res/layout/notification_template_icon_group.xml
ADDING: res/layout/notification_template_lines_media.xml
ADDING: res/layout/notification_template_media.xml
ADDING: res/layout/notification_template_media_custom.xml
ADDING: res/layout/notification_template_part_chronometer.xml
ADDING: res/layout/notification_template_part_time.xml
ADDING: res/layout/status_bar_ongoing_event_progress_bar.xml
ADDING: res/mipmap-anydpi-v26/icon.xml
ADDING: res/mipmap-hdpi-v4/icon.png
ADDING: res/mipmap-hdpi-v4/icon_background.png
ADDING: res/mipmap-hdpi-v4/icon_foreground.png
ADDING: res/mipmap-mdpi-v4/icon.png
ADDING: res/mipmap-mdpi-v4/icon_background.png
ADDING: res/mipmap-mdpi-v4/icon_foreground.png
ADDING: res/mipmap-xhdpi-v4/icon.png
ADDING: res/mipmap-xhdpi-v4/icon_background.png
ADDING: res/mipmap-xhdpi-v4/icon_foreground.png
ADDING: res/mipmap-xxhdpi-v4/icon.png
ADDING: res/mipmap-xxhdpi-v4/icon_background.png
ADDING: res/mipmap-xxhdpi-v4/icon_foreground.png
ADDING: res/mipmap-xxxhdpi-v4/icon.png
ADDING: res/mipmap-xxxhdpi-v4/icon_background.png
ADDING: res/mipmap-xxxhdpi-v4/icon_foreground.png
ADDING: res/mipmap/icon.png
ADDING: res/mipmap/icon_background.png
ADDING: res/mipmap/icon_foreground.png
ADDING: resources.arsc
Starting signing of the APK binary using C:/Users/lisan/AppData/Local/Android/Sdk/build-tools/30.0.3/apksigner.bat
Signing debug binary using: 
C:/Users/lisan/AppData/Local/Android/Sdk/build-tools/30.0.3/apksigner.bat sign --verbose --ks C:/Users/lisan/.android/debug.keystore --ks-pass pass:android --ks-key-alias androiddebugkey C:/Users/lisan/Documents/Icon and Splash Missing/export/Icon and Splash Missing.apk
Signed

Verifying signed build using: 
C:/Users/lisan/AppData/Local/Android/Sdk/build-tools/30.0.3/apksigner.bat verify --verbose C:/Users/lisan/Documents/Icon and Splash Missing/export/Icon and Splash Missing.apk
Verifies
Verified using v1 scheme (JAR signing): true
Verified using v2 scheme (APK Signature Scheme v2): true
Verified using v3 scheme (APK Signature Scheme v3): true
Verified using v4 scheme (APK Signature Scheme v4): false
Verified for SourceStamp: false
Number of signers: 1

Successfully completed signing build.
Exporting for Android...
- debug build: false
- export path: C:/Users/lisan/Documents/Icon and Splash Missing/export/Icon and Splash Missing.apk
- export format: 0
- sign build: true
- custom build enabled: false
- apk expansion enabled: false
- enabled abis: armeabi-v7a,arm64-v8a
- export filter: 0
- include filter: 
- exclude filter: 
Loading splash image: res://splash.png
Creating splash background color image.
Loading regular icon from 
- falling back to project icon: res://icon.png
Loading adaptive foreground icon from 
- falling back to using the regular icon
0 param: --xr_mode_regular
1 param: --use_depth_32
2 param: --use_immersive
Starting legacy build system..
ADDING: classes.dex
ADDING: lib/arm64-v8a/libc++_shared.so
ADDING: lib/arm64-v8a/libgodot_android.so
ADDING: lib/armeabi-v7a/libc++_shared.so
ADDING: lib/armeabi-v7a/libgodot_android.so
ADDING: kotlin/annotation/annotation.kotlin_builtins
ADDING: kotlin/collections/collections.kotlin_builtins
ADDING: kotlin/coroutines/coroutines.kotlin_builtins
ADDING: kotlin/internal/internal.kotlin_builtins
ADDING: kotlin/kotlin.kotlin_builtins
ADDING: kotlin/ranges/ranges.kotlin_builtins
ADDING: kotlin/reflect/reflect.kotlin_builtins
ADDING: AndroidManifest.xml
ADDING: res/-3.png
ADDING: res/-s.png
ADDING: res/09.9.png
ADDING: res/0E.png
ADDING: res/1h.png
ADDING: res/2Q.xml
ADDING: res/3m.xml
ADDING: res/4W.xml
ADDING: res/4c.xml
ADDING: res/6A.png
ADDING: res/75.png
ADDING: res/8V.9.png
ADDING: res/8r.xml
ADDING: res/93.9.png
ADDING: res/A1.xml
ADDING: res/Ap.png
ADDING: res/BB.xml
ADDING: res/C7.xml
ADDING: res/Cv.xml
ADDING: res/DS.xml
ADDING: res/FZ.xml
ADDING: res/GQ.xml
ADDING: res/LD.png
ADDING: res/NC.png
ADDING: res/NR.xml
ADDING: res/O3.9.png
ADDING: res/Ot.png
ADDING: res/Pq.9.png
ADDING: res/Qh.png
ADDING: res/Qv.png
ADDING: res/Qw.png
ADDING: res/SH.xml
ADDING: res/SS.xml
ADDING: res/Sb.png
ADDING: res/T2.9.png
ADDING: res/TZ.png
ADDING: res/Th.png
ADDING: res/U-.xml
ADDING: res/UT.xml
ADDING: res/Vv.png
ADDING: res/XB.xml
ADDING: res/Xs.9.png
ADDING: res/cH.xml
ADDING: res/cR.png
ADDING: res/dH.9.png
ADDING: res/dI.xml
ADDING: res/eK.9.png
ADDING: res/eQ.png
ADDING: res/fx.xml
ADDING: res/gW.xml
ADDING: res/hj.9.png
ADDING: res/iL.xml
ADDING: res/jK.9.png
ADDING: res/kI.xml
ADDING: res/kM.xml
ADDING: res/kW.png
ADDING: res/pb.png
ADDING: res/q6.xml
ADDING: res/qQ.png
ADDING: res/tr.9.png
ADDING: res/u6.xml
ADDING: res/yO.xml
ADDING: res/ya.xml
ADDING: res/zc.png
ADDING: resources.arsc
Starting signing of the APK binary using C:/Users/lisan/AppData/Local/Android/Sdk/build-tools/30.0.3/apksigner.bat
Signed

Verifies
Verified using v1 scheme (JAR signing): true
Verified using v2 scheme (APK Signature Scheme v2): true
Verified using v3 scheme (APK Signature Scheme v3): true
Verified using v4 scheme (APK Signature Scheme v4): false
Verified for SourceStamp: false
Number of signers: 1

Successfully completed signing build.
EditorSettings: Save OK!

When I export as release using 3.2.2 it generates the correct filenames

@noidexe
Copy link
Contributor Author

noidexe commented Jul 20, 2021

The issue seems limited to the old method of exporting. If you install the android template, tick Custom Build and export as APK it seems to work just fine. Added it as a workaround in the issue description.

@akien-mga akien-mga added this to the 3.4 milestone Jul 20, 2021
@m4gr3d
Copy link
Contributor

m4gr3d commented Jul 20, 2021

Looks like the release build template was optimized when it wasn't in the past. Could be a side effect of the upgrade to the plugin version; I'll take a look.

@m4gr3d
Copy link
Contributor

m4gr3d commented Jul 20, 2021

According to the documentation:
When building the release version of your app, by default, R8 automatically performs the compile-time tasks described above for you.

So yes, release builds are optimized by default. It should be possible to disable that however.

@noidexe
Copy link
Contributor Author

noidexe commented Jul 20, 2021

According to the documentation:
When building the release version of your app, by default, R8 automatically performs the compile-time tasks described above for you.

So yes, release builds are optimized by default. It should be possible to disable that however.

On 3.4 using the custom android template I get the same directory structure with short names (I guess that's the optimized one?) but the icon and splashes are there, so I don't know if that is the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment