Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Thanks for trying out Room KMP! This looks like an issue with Android 9+ and armv7 and the way we compile sqlite3.c, specifically linking to the atomic library in C. We'll try to get this fix as soon as possible.
jb...@google.com <jb...@google.com> #3
ga...@gmail.com <ga...@gmail.com> #4
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit cf121571aac008a756b64cda13f76ae4db3e85a6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed May 29 11:14:42 2024
Link to Android's atomic lib in bundled SQLite
Fix Bundled SQLite loading for devices with older ARM architecture by linking to Android's atomic library instead of relying on Clang's extension (c_atomic) or GCC's built-ins as used in sqlite3.c.
Also add support for passing linker args to androidx's native compilation infra.
See also discussion in
Bug: 341639198
Test: Locally tested via BundledSQLiteDriverTest in a Nexus 5 on API 23
Change-Id: Ia818b7c4f1a990a1b5e35f4c7a3c89694aee0503
M buildSrc/private/src/main/kotlin/androidx/build/clang/ClangSharedLibraryTask.kt
M buildSrc/private/src/main/kotlin/androidx/build/clang/KonanBuildService.kt
M buildSrc/private/src/main/kotlin/androidx/build/clang/MultiTargetNativeCompilation.kt
M buildSrc/private/src/main/kotlin/androidx/build/clang/NativeTargetCompilation.kt
M sqlite/sqlite-bundled/build.gradle
ap...@google.com <ap...@google.com> #6
I'm using androidx.room:room-runtime-android:2.7.0-alpha01.
This is the log:
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.myproject-ssibkzVuLAo7tvV0puYoEg==/base.apk"],nativeLibraryDirectories=[/data/app/com.myproject-ssibkzVuLAo7tvV0puYoEg==/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libsqliteJni.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at androidx.sqlite.driver.bundled.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.android.kt:1)
at androidx.sqlite.driver.bundled.BundledSQLiteDriver.<clinit>(BundledSQLiteDriver.jvmAndroid.kt:1)
Thank you!
ap...@google.com <ap...@google.com> #7
Can you try using androidx.room:room-runtime-android:2.7.0-alpha04
and confirm if the issue is still present?
ap...@google.com <ap...@google.com> #8
ap...@google.com <ap...@google.com> #9
Ideally you could use AndroidSQLiteDriver
but Room has a bug with the AndroidSQLiteDriver
that is fixed in version 2.7.0-alpha05 that will be released in July 10 so I recommend that if you do switch to using AndroidSQLiteDriver
wait for the alpha05 release.
ap...@google.com <ap...@google.com> #10
I just received two errors from Crashlytics using androidx.sqlite:sqlite-bundled version 2.5.0-alpha06 and BundledSQLiteDriver for both Android and iOS.
Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/app/com.example.app-ACdqnxIlCwzIlzMdaeegRw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.app-ACdqnxIlCwzIlzMdaeegRw==/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libsqliteJni.so"
And the exception is in .setDriver(BundledSQLiteDriver())
Both crashes were from a Nexus 5X running Android 8.1.0
I would say it is the same exception as in
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.com> #12
Same crash on Pixel 6 Pro(android12),Nexus 5X(android8.1) on androidx.sqlite:sqlite-bundled version 2.5.0-alpha11 with room version 2.7.0-alpha11.
ap...@google.com <ap...@google.com> #13
androidx.sqlite:sqlite-bundled version 2.5.0-alpha11 with room version 2.7.0-alpha11
ap...@google.com <ap...@google.com> #14
For those experiencing this issue, can you provide any more detail: stacktrace, bug report, trends (specific API versions, specific manufacturer)?
Usually with UnsatisfiedLinkError
there is more in the logs / error mentioning why the native library couldn't be used, specifically the missing symbol. I have so far validated we are
ap...@google.com <ap...@google.com> #15
Same crash on Pixel 6 pro
androidx-room = "2.7.0-alpha11"
androidx-sqlite = "2.5.0-alpha11"
Attached a stack trace
Description
Component used: Navigation Version used: 2.3.0
In some of our jvm tests we want to check that the right navigation is triggered. Since we are not on an actual device we are checking if the correct
NavDirections
object andNavOptions
object are passed to the navigator. HoweverNavOptions
currently does not overrideequals
andhashCode
which makes this more complicated than needed. Since allNavOptions
fields are eitherint
orboolean
this should be straightforward to do.