Room database is not working in mac book pro m1 - Printable Version +- 0Day Forums (https://zeroday.vip) +-- Forum: Coding (https://zeroday.vip/Forum-Coding) +--- Forum: Kotlin (https://zeroday.vip/Forum-Kotlin) +--- Thread: Room database is not working in mac book pro m1 (/Thread-Room-database-is-not-working-in-mac-book-pro-m1) |
Room database is not working in mac book pro m1 - robynrtyixcuqwv - 07-20-2023 Room database is not working in mac book pro m1 i have already added id 'kotlin-kapt' [screen shoot of android studio console log][1] > * What went wrong: Execution failed for task ':app:kaptDebugKotlin'. > > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction > > java.lang.reflect.InvocationTargetException (no error message) > > Caused by: java.lang.reflect.InvocationTargetException at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at > org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:90) > at > org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:31) > at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:45) ... 31 more > > Caused by: java.lang.Exception: No native library is found for > os.name=Mac and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64 > at > org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:333) > at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:64) > at > androidx.room.verifier.DatabaseVerifier.<clinit>(DatabaseVerifier.kt:71) > ... 50 more [1]: RE: Room database is not working in mac book pro m1 - wildfowl736 - 07-20-2023 Simply use Room 2.4.0-alpha03 ``` def room_version = "2.4.0-alpha03" implementation "androidx.room:room-runtime:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version" ``` Edit : The answer consisted of two solutions to solve the issue , since the above written solution was successful for many ,the other solution is removed . RE: Room database is not working in mac book pro m1 - susiesuslik748 - 07-20-2023 add dependency: kapt "org.xerial:sqlite-jdbc:3.34.0" |