The error message
Caused by: java.lang.ExceptionInInitializerError at androidx.room.processor.DatabaseProcessor.doProcess(DatabaseProcessor.kt:82) at androidx.room.processor.DatabaseProcessor.process(DatabaseProcessor.kt:57) at androidx.room.RoomProcessor$DatabaseProcessingStep.process(RoomProcessor.kt:134) at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:330) at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:181) at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt) at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:161) at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802) at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:713) at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1043) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1184) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068) at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:78) ... 30 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:68) ... 45 moreCopy the code
why
SQLite native library does not support Apple M1,
To solve
Add the dependent
Kapt 'org. Xerial: sqlite - JDBC: 3.34.0'Copy the code
Or:
This issue has now been fixed in the latest version of Room 2.4.0-Alpha03.
So rely on Room 2.4.0-alpha03 or above:
Implementation "androidx. Room: room - the runtime: 2.4.0 - alpha03" kapt "androidx. Room: room - the compiler: 2.4.0 - alpha03"Copy the code
\