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

Added Android bundler option to extract native libs on install #8956

Merged
merged 3 commits into from
May 29, 2024

Conversation

britzl
Copy link
Contributor

@britzl britzl commented May 19, 2024

The Android bundler will now respect the android:extractNativeLibs attribute on the application level in AndroidManifest.xml. The option is configurable from game.project in the Android section.

This attribute indicates whether the package installer extracts native libraries from the APK to the file system. If set to "false", your native libraries are stored uncompressed in the APK. Although your APK might be larger, your application loads faster because the libraries load directly from the APK at runtime.

IMPORTANT

If you are using a custom AndroidManifest.xml and would like to use this new option please make sure to add the android:extractNativeLibs attribute to the <application> tag:

<application
        android:extractNativeLibs="{{android.extract_native_libs}}"

Fixes #8955

@britzl britzl requested a review from AGulev May 29, 2024 07:19
AGulev
AGulev previously approved these changes May 29, 2024
editor/resources/meta.edn Show resolved Hide resolved
uncompressedGlob += ",";
uncompressedGlob += "\"lib/**/*.so\"";
}
writer.write("{\"compression\":{\"uncompressedGlob\": [" + uncompressedGlob + "]}}");
Copy link
Contributor

Choose a reason for hiding this comment

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

At some point it will be useful to give access to that file as well as we do for manifest files, but it's good for now.

@AGulev
Copy link
Contributor

AGulev commented May 29, 2024

Make sure you fixed the Editor's test before merge

@AGulev
Copy link
Contributor

AGulev commented May 29, 2024

The edtor test checks that all the values aren't default, so you need to fix the game.project file in failed test

@britzl britzl merged commit bb8d01c into dev May 29, 2024
22 checks passed
@britzl britzl deleted the Issue-8955-handle-extract-native-libs-android-option branch May 29, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android bundler should respect the extractNativeLibs manifest option
2 participants