-
Notifications
You must be signed in to change notification settings - Fork 394
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
Force the native libraries compression for NativeActivity-based applications targeting an Android 6.0 device #134
Comments
I created a similar bug report in the ndk-samples respository: |
Hello @plecesne, I apologize for pinging you. I also reported this issue in https://issuetracker.google.com/issues/145315585. Please that can help you to decide how to address better this bug report. Thankfully, |
While this is being investigated, consider adding |
Hello @plecesne Thank you for the suggestion. I didn't mention the fact that I use a custom build system, in this case, setting the uncompressNativeLibraries config to false in the specified BundleConfig.json file addresses the reported issue. Unfortunately, this has the negative effect of affecting all Android versions. Thankfully, |
Thanks, yes, we're discussing this issue internally to find the best solution. |
Hello @plecesne, That is pretty lovely to hear. Thank you very much and sorry for any inconvenience. Thankfully, |
Should be fixed in 0.13.3 |
Thank you very much for addressing this issue. |
Description
Installing an application that has the installLocation manifest attribute set to internalOnly using splits APKs extracted from an Android App Bundle highlights an issue. The bundletool command line tool decides to leave the native libraries uncompressed and set the extractNativeLibs manifest attribute to false based on the fact of the connected device is running Android 6.0 and the application has the installLocation manifest attribute set to internalOnly. Please the result is that the application crashes at startup on an Android 6.0 device.
Please this bug report is about considering to change the bundletool command line tool in order to detect that the application is based on the NativeActivity class (for example, detecting if the launcher activity has similar declaration to
<meta-data android:name="android.app.lib_name" android:value="native-activity" />
) and force the native libraries compression if the target device is running Android 6.0.Bundletool version affected
Version: 0.10.3
Stacktrace
To Reproduce
Expected behavior
The application succeeds to launch.
Actual behavior
The application fails to launch due to:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.native_activity/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: native-activity
Known workaround
Setting the installLocation manifest attribute to auto or preferExternal causes the bundletool command line tool to compress the native libraries and the reported issue is no longer reproducible.
Environment:
The text was updated successfully, but these errors were encountered: