Create Room Entities | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/10892694-room-database-getting-started/lessons/3

Following instructions in this video will fail on an M1 Mac with the follow error:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDebugKotlin'.
...
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
...
Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64

I’ll see if upgrading Gradle / Kotlin / Room helps

Adding this line:
kapt "org.xerial:sqlite-jdbc:3.34.0"

in your build.gradle file before your other tutorial dependencies (I don’t know if order matters) will patch up the problem for M1 mac users.