Room cannot verify the data integrity 🤖 Android

Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number

The Room entity definitions changed, but the database version wasn’t increased or no migration was provided.

Seen on: Android

Meaning

Room stores a schema hash. Changing entities requires bumping @Database(version) and adding a Migration (or fallbackToDestructiveMigration for dev builds). During development, uninstalling the app also resets it.

Common causes

  • Entity fields/tables changed without version bump
  • Migration missing for the new version
  • Two builds with different schemas on the same device

⚡ Quick fix

  1. Increase version and add a Migration
  2. Use fallbackToDestructiveMigration() only when data loss is OK
  3. Export schemas (room.schemaLocation) to auto-generate migrations

Detailed fix by platform

Kotlin

  1. kotlin
    @Database(entities = [User::class], version = 3, autoMigrations = [AutoMigration(from = 2, to = 3)])
    abstract class AppDb : RoomDatabase()

How to diagnose

  1. Version — @Database version vs installed
  2. Migrations — Path from old to new

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.