Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Room database is not working in mac book pro m1

Room database is not working in mac book pro m1 i have already added id 'kotlin-kapt'

screen shoot of android studio console log

  • 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.(DatabaseVerifier.kt:71) ... 50 more

like image 313
Sikandar Avatar asked Aug 25 '21 12:08

Sikandar


People also ask

What is Androidx room?

room. Kotlin |Java. Room is a Database Object Mapping library that makes it easy to access database on Android applications. Rather than hiding the details of SQLite, Room tries to embrace them by providing convenient APIs to query the database and also verify such queries at compile time.

What is room persistence library?

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. In particular, Room provides the following benefits: Compile-time verification of SQL queries.

Is room an ORM?

The room is an ORM ( Object Relational Mapper ) for SQLite database in Android. It is part of the Architecture Components.

How to fix MacBook Pro M1 not detecting Ethernet?

The simplest way to try and remedy your MacBook Pro M1 not detecting Ethernet is to remove the connection, and then manually add the Ethernet connection using System Preferences. This isn’t the same as just plugging and unplugging the Ethernet jack from the monitor or your Mac.

Do M1 MacBook Pro M1 monitors work with Ethernet monitors?

However, for one reason or another, it seems that the M1 MacBook Pro models are not exactly playing well together with these monitors when the Ethernet is connected. Luckily, there are a few different steps that you can take before needing to reach out to the maker of your monitor or Apple.

Why did you buy a MacBook Pro M1 for work?

I work as a programmer in IT company. I bought MacBook Pro M1 because I want to use it as primary computer for my work. I have some online calls via Slack (chat and voice/video calls application used in company) with company employees who work remotely.

How to fix M1 MacBook Air won’t start?

Solution: Restart your MacBook Air, run M1 Mac compatible apps, and use your laptop on a flat surface with good airflow. By the way, M1 MacBook Air is designed to sustain workloads without a fan, and it won’t overheat and damage the silicon chip. So, if the CPU temperature increases, Mac throttles down to make sure the processor runs cool. 10.


Video Answer


1 Answers

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 .

like image 124
Karunesh Palekar Avatar answered Nov 14 '22 21:11

Karunesh Palekar