I'm trying to use the new Android App Bundles.
I run some test locally on my devices, and everything works correctly. However, once deployed to production, I am starting to see a few errors like this:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/xyz/base.apk"],nativeLibraryDirectories=[/data/app/xyz/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libsqlite3x.so"
java.lang.Runtime.loadLibrary (Runtime.java)
java.lang.System.loadLibrary (System.java)
io.requery.android.database.sqlite.SQLiteDatabase.<clinit> (SQLiteDatabase.java:86)
io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:241)
io.requery.android.database.sqlite.SQLiteOpenHelper.getReadableDatabase (SQLiteOpenHelper.java:199)
...
The error states that a library I'm using (requery/sqlite-android) cannot find the .so file that it needs. This seems strange, since I checked with bundletool, and in every APK the file .so is there.
The error happens on two devices: a Samsung Galaxy Note 7 and a TECNO-J8, running Android 6 and 5 respectively.
According to the Play Store, the error happens for app installed through Google Play, so I doubt the error is related to APK sideloading.
The generated APK bundle includes splits for the following architectures:
Do you have any hints?
This issue might be related to https://issuetracker.google.com/issues/127691101
It happens on some devices of LG or old Samsung devices where the user has moved the app to the SD Card.
One way of fixing the issue is to use Relinker library to load your native libraries instead of directly calling System.load method.
https://github.com/KeepSafe/ReLinker
Another way is to block the movement of the app to the SD card or by keeping android.bundle.enableUncompressedNativeLibs=false in your gradle.properties file.
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