1
Failed to load native library:sqlite-3.36.0-208a62b9-087f-4c8f-b123-bcea6f227593-libsqlitejdbc.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.36.0-208a62b9-087f-4c8f-b123-bcea6f227593-libsqlitejdbc.so: /tmp/sqlite-3.36.0-208a62b9-087f-4c8f-b123-bcea6f227593-libsqlitejdbc.so: failed to map segment from shared object

Android Grade Plugin Version: 7.0.4
Gradle Version: 7.3.3
Gradle JDK: 11.0.10 (Android Studio default JDK)

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
}
dependencies {
    def room_version = "2.4.1"
...
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"
}

I've struggled to find anything concrete on how to fix the issue. Android Room + Kotlin + Kapt + IntelliJ + MacOS Catalina: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8

https://youtrack.jetbrains.com/issue/IDEA-246228

Android Studio Arctic Fox | 2020.3.1 Patch 2
Build #AI-203.7717.56.2031.7678000, built on August 26, 2021
Runtime version: 11.0.10+0-b96-7249189 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.11-gentoo
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4

Any ideas on how to resolve it is appreciated.

1 Answers1

0

This problem was due to noexec being set on /tmp. You can remove the restriction if you have the necessary privileges. Alternatively you can set the java.io.tmpdir in Android studio's VM options.

See Android kapt java.lang.UnsatisfiedLinkError Room for futher details.