Closed yuwaixingtian closed 1 year ago
Use room database 2.6.0-beta01 or up
also facing sams error while build project with room database
Compiling with JDK Java compiler API.
Failed to load native library:sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so. osinfo: Linux/aarch64
java.lang.UnsatisfiedLinkError: /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so: dlopen failed: library "libc.so.6" not found: needed by /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so in namespace (default)
warning: Current JDK version 17-internal+0-adhoc.root.src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.
1 warning
> Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.ExceptionInInitializerError
also facing sams error while build project with room database
Compiling with JDK Java compiler API. Failed to load native library:sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so. osinfo: Linux/aarch64 java.lang.UnsatisfiedLinkError: /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so: dlopen failed: library "libc.so.6" not found: needed by /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so in namespace (default) warning: Current JDK version 17-internal+0-adhoc.root.src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+. 1 warning > Task :app:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > java.lang.ExceptionInInitializerError
Room version 2.6.0-beta01 used sqlite-jdbc 3.41.2.2. You use old room version
Use room database 2.6.0-beta01 or up
Thank you, teacher
also facing sams error while build project with room database
Compiling with JDK Java compiler API. Failed to load native library:sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so. osinfo: Linux/aarch64 java.lang.UnsatisfiedLinkError: /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so: dlopen failed: library "libc.so.6" not found: needed by /data/data/com.itsaky.androidide/files/usr/tmp/sqlite-3.36.0-24eedfcd-05f8-4370-bb09-60c7b240a8e5-libsqlitejdbc.so in namespace (default) warning: Current JDK version 17-internal+0-adhoc.root.src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+. 1 warning > Task :app:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > java.lang.ExceptionInInitializerError
Room version 2.6.0-beta01 used sqlite-jdbc 3.41.2.2. You use old room version
Thank you, teacher. After using version 2.6.0-beta01, there were indeed no errors, but the following issues occurred:
warning: Current JDK version 17-internal+0-adhoc..src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+. Note: /storage/emulated/0/AndroidIDEProjects/NewOrangeWebProject/OrangeWeb/library-base/src/main/java/com/example/miaow/base/view/HeartView.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 warning
I don't know if this will affect the normal use of the room function, but now it can be packaged normally. My JDK version is 17.
compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 }
`kotlinOptions {
jvmTarget = "17"
}`
Follow this tutorial
Okay, thank you. I'll try using the methods in the tutorial to
{ // exclude the sqlite-jdbc dependency from the room-compiler exclude group: 'org.xerial', module: 'sqlite-jdbc' }
Replace the plugin, but the following prompt will still appear:
warning: Current JDK version 17-internal+0-adhoc..src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+. Note: /storage/emulated/0/AndroidIDEProjects/NewOrangeWebProject/OrangeWeb/library-base/src/main/java/com/example/miaow/base/view/HeartView.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 warning
My JDK version is also 17, and I'm not sure if this error will affect the operation of my room function. After a simple test, there were no issues with adding, deleting, or modifying it
warning: Current JDK version 17-internal+0-adhoc..src has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.
I think the Room compiler fails to determine the version of JDK in AndroidIDE and hence the warning. You can ignore this warning.
Note: /storage/emulated/0/AndroidIDEProjects/NewOrangeWebProject/OrangeWeb/library-base/src/main/java/com/example/miaow/base/view/HeartView.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 warning
This is a warning that originates from your Java source of files. It might be using deprecated APIs.
What happened?
The configuration in build.gradle.kts is as follows:
implementation(libs.androidx.room.ktx) implementation(libs.androidx.room.runtime) annotationProcessor(libs.androidx.room.compiler) ksp(libs.androidx.room.compiler)
My version is abbreviated, and the configuration is actually the same as the official version provided by Room. The version of Room is 2.5.2, but I have tried all previous versions that have encountered this issue and cannot compile properly.
Gradle is 8.2:https://services.gradle.org/distributions/gradle-8.2-bin.zip
What's the expected behavior?
null
What version of AndroidIDE you're using?
v2.5.2 (debug builds)
Relevant log output
Duplicate issues
Code of Conduct