-
Notifications
You must be signed in to change notification settings - Fork 75
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
"Failed to load dynamic library" error on Android API 35 emulator with 16KiB page size #257
Comments
Thanks for the report! Are you using an emulator with 16KiB page sizes? (if not sure, run Are you using |
Hello, yes it turns out I'm using the 16KiB page size on my emulator
Hmm interesting that I can get my app to run on the emulator when it sounds like you may be having issues. I tried running a vanilla I did try running my app on an Android API 35 emulator without 16KiB paging and I can confirm that I see no errors. So it sounds like the 16KiB page size is actually the root issue. Also to answer your other questions, we are actually not using |
Interesting, I have the same Flutter version. Is this an x86 or an arm emulator? I only mentioned |
Hello, FYI I tried using Unfortunately it seems that failed too, but the error message does appear to be more useful
I searched around and it appears that Realm had a similar issue here with the suggestion to compile libraries using 16KB ELF alignment as a fix (as seen in this Realm PR). I suppose you'd need to recompile your sqlite-native-libraries with 16KB ELF alignment to fix the issue? At least, that's what it looks like to me, but admittedly it's a bit out of my depth hehe. Feel free to message if you need help with testing |
Should be fixed in simolus3/sqlite-native-libraries@d32ebbe, at least I managed to get it working on x64 and armv8 emulators with 16KiB page sizes. To help test this, can you add |
I can confirm that I no longer get the error message on my 16KiB emulator when I add For reference, I also tested on a normal emulator image and there are no errors either. |
Thanks for the confirmation! I've just published version |
Hello, we've been doing a round of updating our apps' Flutter version, deps, etc. and we've been getting errors on our app with
drift
, usingsqlite3
under the hood.Notably the error only appears on the Android 15 (API 35) emulator so far, not on our real devices with older Android versions (I tested on my Galaxy S24+ with Android 14), and not on my Android API 32 emulator.
The error is as follows:
We create our database in a fairly standard way (using
drift
):Here are some of the relevant deps in our
pubspec.yaml
:And
pubspec.lock
(which should be up to date as we just ranflutter pub upgrade --major-versions
):Flutter doctor output (we are now on the latest version of Flutter):
I tried unzipping the APK that gets generated when running on the API 35 emulator, and I do see
libsqlite3.so
under each of thelib/<platform>/
foldersLet me know if you need more information. Unfortunately we don't have any real devices with Android 15.0 to test with yet, just emulators so far.
The text was updated successfully, but these errors were encountered: