I had a problem installing my app on the new Android Q Beta 1 via Android Studio. It looks just like this problem.
The answer suggests setting android:extractNativeLibs
in the Manifest and it does fix the installation problem. Funny is, that is doesn't matter if it's set to true
or false
(either case work) but I must set it.
As realm is the only native code included in my app, I wanted to ask if I should set this flag.
Until now, I didn't need it but this and this tells me that it's actually a good thing to set this to false
. It even states:
When building an AAB, it has the extractNativeLibs flag set to "false" by default.
With this set, it should be fine to use an APK or an AAB but the native code must be zipaligned. So one question remains:
Are the realm binaries correctly zipaligned?
Or in general: Are there any recommendations when using realm?
When everything is fine with this flag (and my previous AABs working just fine), the only issue here seems to be Android Q needing this flag when installing a (debug-)APK, right?
When building an AAB, the native libraries will be aligned correctly automatically (the generation of APKs is handled by bundletool).
Regarding APK not running without the attribute set, this looks like a bug, either in Android Q or Android Grade Plugin. Could you file a bug for the AGP (they'll reroute it if the problem is in the platform)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With