org/sqlite/native/Mac/aarch64 Error [How to Solve]

Problem Description:
When building a project with m1 chip, if you use room, you will get the following error because the sqlite jar package is not compatible with arm.

Caused by: java.lang.Exception: No native library is found for and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64
    at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(
    at org.sqlite.SQLiteJDBCLoader.initialize(
    ... 50 more

To update the room version, you don’t need to add org.xerial:sqlite-jdbc:3.34.0 as the web says, just update the room directly as shown below.

    def room_version = "2.4.0-beta01"  
    implementation "$room_version"
    kapt "$room_version"
    implementation "$room_version"

Read More: