以下の内容はhttps://itechblog.hatenablog.com/entry/2023/01/25/193127より取得しました。


【Android開発】Room利用時のエラー

概要

Roomを使っているAndroidアプリの開発中、以下のエラーに遭遇しました。

Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.

解決方法

Roomでは、スキーマをエクスポートする仕様があり、エクスポート先が未指定だと上記のエラーが発生します。

そのため、@Databaseアノテーションの宣言において、以下のようにexport=falseを指定するか、エクスポート先のディレクトリを指定します。

@Database(entities = [User::class], version = 1, exportSchema = false)



以上の内容はhttps://itechblog.hatenablog.com/entry/2023/01/25/193127より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14