-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
App Bundle: MissingLibraryException #5977
Comments
Hi @Jeff11 This message looks rather strange though: |
That was confusing from my side, sorry. Of course, either x86 or armeabi was loaded per device, not both. This crash happens on <0.2% of devices. |
I have a similar issue using Android App Bundle.
and
Filed an issue on Google side to check if it's a fault on the bundle system itself: https://issuetracker.google.com/issues/109448556 |
@Jeff11 Are you using another library which uses You can now double check the generated APK locally using bundletool as described by the official doc & see if you can reproduce the issue before pushing to Play |
I have no other libraries that use armeabi. Realm is the only native library in use. After uploading the AAB to the play store, I am able to download the APKs by device and they worked fine. |
I'm experiencing the same issue with Android App Bundle:
Strangely only on devices which use MediaTek chipsets like: Quantum MUV PRO - MediaTek MT6753 |
From the comments in https://issuetracker.google.com/issues/109448556 It seems that this is related to side-loaded APK's. Before, if you didn't manually use ABI split, the APK would contain all the code needed for all CPU architectures. With App Bundle a split is happening automatically and if people are distributing the APK to devices with a different architecture, the app will crash with the above message. I have been told this is behaviour is quite common in areas where data traffic might be expensive. Unfortunately, there isn't much we can do about this as it is a "user error". The best we can do is probably having a better check if we cannot match the CPU architecture with the native code found. If that happens we can throw a better exception. App developers can then use this exception to show a dialogue to the user saying the app doesn't work on their device. I'll keep this issue open as it hasn't been closed on Googles side yet, so we cannot yet rule out a bug on their end. |
It looks like the our ReLinker has problems loading native libs from AppBundles as we only look in the base APK for the native library. We would be very happy about a PR on this, as we don't use AppBundles our selfs. The following comment from a google issue sums it up quite well:
|
A PR is currently in review that should fix this: KeepSafe/ReLinker#46 |
Support for App Bundles has been merged to Relinker |
@cmelchior when it will be released? |
@cmelchior It looks like ReLinker released |
Waiting for a 5.5.1 version really much, it's the only obstacle for us to make an APK almost three times smaller. |
Yes, the plan is to release it next week. Our SNAPSHOT uploads have been broken, but should work again, so you can also test it by using our |
@cmelchior : I believe that Realm Java 5.6.0 has been released with a fix for this ticket. Can you verify and close? |
Any update or new information about this issues? |
Have just update the classpath to classpath "io.realm:realm-gradle-plugin:5.11.0" |
Does this issue still happen? Or can I update my app to use the app bundle? |
+1 @lucasrafagnin unfortunately still does for a random small percentage of users |
+1 |
2 similar comments
+1 |
+1 |
You are most likely missing this check on YOUR side: https://developer.android.com/guide/app-bundle/sideload-check#application_class_check You should make sure that the APK installed by the user has the library variant in Realm. If you are using Android App Bundle, then you should have this check in your Application class. This is not a problem with Realm. |
@Zhuinden the Instead I'm catching the |
@Jeff11 hmm I thought Maybe try
|
My intention was to build an APK that is not compatible and therefore But |
But was it actually an Android App bundle, and not an APK? |
An APK. When using the App Bundle, you would first have to extract an APK with a single ABI from it. That I didn't test. |
missing required splits should only be relevant when Android App Bundle is used. |
Try this, might be helpful. |
https://realm.io/docs/java/latest/#faq-librealm-jni I tried this method and it crashed.
|
https://realm.io/docs/java/latest/#faq-librealm-jni This happens every time I try to run my app on a device, without fail. I'm happy to provide more code if requested. I've also tried this method and it made no difference, it's still crashing on All of this started after trying to update the application
Logcat output
|
the same me, i upgraded to 6.0.0. It works. |
Gradle plugin: "io.realm:realm-gradle-plugin:6.0.0"
|
Folding this into #6673 |
Goal
To find a solution for ABI related problems
Expected Results
To run all split versions of app successfully
Actual Results
Version of Realm and tooling
Realm version(s): 5.1.0
Android Studio version: 3.2 canary 15
Which Android version and device: Nexus 5X tries to load x86, but most reported devices try armeabi
Many different devices are affected
App is not using other so files than Realm.
From the Google Play dashboard I can see that no armeabi version is generated, only the 5 that Realm uses.
Edit: removed the x86 from the stacktrace, that was confusing
The text was updated successfully, but these errors were encountered: