{
  "id": "android/room-cursor-not-found",
  "signature": "android.database.sqlite.SQLiteException: no such table: users (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM users",
  "signature_zh": "android.database.sqlite.SQLiteException：没有这样的表：users（代码 1 SQLITE_ERROR）：编译时：SELECT * FROM users",
  "regex": "android\\.database\\.sqlite\\.SQLiteException: no such table: .+ \\(code 1 SQLITE_ERROR\\)",
  "domain": "android",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "Room database migration failed or the schema version is mismatched, causing the table to not exist in the current database.",
  "root_cause_type": "generic",
  "root_cause_zh": "Room 数据库迁移失败或架构版本不匹配，导致当前数据库中不存在该表。",
  "versions": [
    {
      "version": "Room 2.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Room 2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only works if the database version is reset; if the schema is still incorrect, the error persists.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Room manages schema versions; manual changes cause version conflicts and data loss.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Room will throw an IllegalStateException about missing migration or fallback to destructive migration if configured.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add a proper migration to the Room database builder. Example: Room.databaseBuilder(context, AppDatabase.class, \"my-db\").addMigrations(MIGRATION_1_2).build(); where MIGRATION_1_2 is a Migration object that creates the table.",
      "success_rate": 0.85,
      "how": "Add a proper migration to the Room database builder. Example: Room.databaseBuilder(context, AppDatabase.class, \"my-db\").addMigrations(MIGRATION_1_2).build(); where MIGRATION_1_2 is a Migration object that creates the table.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use fallbackToDestructiveMigration() to recreate the database, but this will delete existing data. Only use in development or if data loss is acceptable.",
      "success_rate": 0.95,
      "how": "Use fallbackToDestructiveMigration() to recreate the database, but this will delete existing data. Only use in development or if data loss is acceptable.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Export the schema and verify the JSON file matches the entities. Add @Database(entities = {User.class}, version = 2, exportSchema = true) and check the generated schema in app/schemas/.",
      "success_rate": 0.8,
      "how": "Export the schema and verify the JSON file matches the entities. Add @Database(entities = {User.class}, version = 2, exportSchema = true) and check the generated schema in app/schemas/.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "向 Room 数据库构建器添加正确的迁移。示例：Room.databaseBuilder(context, AppDatabase.class, \"my-db\").addMigrations(MIGRATION_1_2).build(); 其中 MIGRATION_1_2 是创建表的 Migration 对象。",
    "使用 fallbackToDestructiveMigration() 重新创建数据库，但这会删除现有数据。仅在开发中或可接受数据丢失时使用。",
    "导出架构并验证 JSON 文件与实体匹配。添加 @Database(entities = {User.class}, version = 2, exportSchema = true) 并检查 app/schemas/ 中生成的架构。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/training/data-storage/room/migrating",
  "official_doc_section": null,
  "error_code": "1",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}