X Tutup
Skip to content

Fix Android export with multiple architectures failing when GDExtension includes native dependencies#114483

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
ej-sanmartin:fix/android-export-multi-arch
Jan 2, 2026
Merged

Fix Android export with multiple architectures failing when GDExtension includes native dependencies#114483
akien-mga merged 1 commit intogodotengine:masterfrom
ej-sanmartin:fix/android-export-multi-arch

Conversation

@ej-sanmartin
Copy link
Contributor

Fixes #111407

Root Cause

The dependency lookup is defined in a lambda using p_features which contains all architectures, so dependencies for every architecture were being added during each architecture's pass and thus causing duplicates.

Solution

This PR uses features_wo_arch and the current arch_tag instead, so dependencies are only resolved for the architecture being processed.

Tested

Built Godot locally for macOS, exported w/ Android preset and armeabi-v7a (arm32), arm64-v8a (arm64) target architectures selected, and built an .apk successfully.

Relevant logs captured:

ADDING: kotlin/reflect/reflect.kotlin_builtins
Signing binary using: 
/Users/ed/Library/Android/sdk/build-tools/35.0.0/apksigner sign --verbose --ks <REDACTED> --ks-pass pass:<REDACTED> --ks-key-alias <REDACTED> /Users/ed/Downloads/test0/test.apk
Signed

@ej-sanmartin ej-sanmartin requested a review from a team December 31, 2025 20:02
@akien-mga akien-mga added bug platform:android topic:gdextension topic:export cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Jan 1, 2026
@akien-mga akien-mga added this to the 4.6 milestone Jan 1, 2026
@akien-mga akien-mga requested review from a team and removed request for a team January 1, 2026 20:46
Copy link
Contributor

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I haven't tested it (and I've always found this code kind of confusing) but the change makes sense to me

@akien-mga akien-mga merged commit f0aeea2 into godotengine:master Jan 2, 2026
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@ej-sanmartin ej-sanmartin deleted the fix/android-export-multi-arch branch January 7, 2026 20:02
@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Android export with multiple architectures fails when GDExtension includes native dependencies

4 participants

X Tutup