Challenge: Addressing the Schema Warning

If you look through your build logs, you will find a warning about your app not providing a schema export directory:

    warning: 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.

A database schema represents the structure of the database, including what tables are in the database, what columns are in those tables, and any constraints on and relationships between those tables. Room supports exporting your database schema into a file so you can store it in a source control. Exporting your schema is often useful so that you have a versioned ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.