Error map

IllegalStateException: A migration from 1 to 2 was required but not found java.lang.IllegalStateException: A migration from 1 to 2 was required but not found. Please provide the necessary Migration path

Android · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

IllegalStateException: A migration from 1 to 2 was required but not found — java.lang.IllegalStateException: A migration from 1 to 2 was required but not found. Please provide the necessary Migration path (Android)IllegalStat…Room cannot verify the data integrity — Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number (Android)Room cannot verify …Cannot access database on the main thread — Room: Cannot access database on the main thread since it may potentially lock the UI for a long period of time (Android)Cannot access datab…Core Data: Failed to load model named / Unresolved error — Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134060 (iOS)Core Data: Failed t…CorruptionException: Unable to parse preferences proto — androidx.datastore.core.CorruptionException: Unable to parse preferences proto (Android)CorruptionException…App crashes after restore on a new phone — (behavior) crash on first launch after device transfer / Auto Backup (Android)App crashes after r…SQLiteDatabaseLockedException: database is locked — android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY) (Android)SQLiteDatabaseLocke…SwiftData: Failed to create ModelContainer — Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer) (iOS)SwiftData: Failed t…CursorWindow: Window is full: requested allocation bytes — android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed (Android)CursorWindow: Windo…IllegalStateException: Cannot perform this operation because the connection pool has been closed — java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase (Android)IllegalStateExcepti…SQLiteConstraintException: FOREIGN KEY constraint failed — android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY) (Android)SQLiteConstraintExc…Room: AutoMigration requires a spec for renamed/deleted columns — error: Schema 1 to 2 has a renamed/deleted column, an AutoMigration spec is required (Android)Room: AutoMigration…Class android.support.v4 not found after AndroidX — java.lang.NoClassDefFoundError: android/support/v4/app/Fragment (Android)Class android.suppo…1146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)114642P01 — PostgreSQL: ERROR: relation "x" does not exist (PostgreSQL)42P011022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)1022android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar …Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource li…NetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…NSUnknownKeyException — NSUnknownKeyException: this class is not key value coding-compliant for the key x (iOS)NSUnknownKeyExcepti…Core Data: NSManagedObjectContext was accessed from the wrong queue — CoreData: error: Serious application error. Exception was caught during Core Data change processing (iOS)Core Data: NSManage…Core Data: constraint violation (NSConstraintConflict) — Error Domain=NSCocoaErrorDomain Code=133021 "Could not merge changes." NSConstraintConflict (iOS)Core Data: constrai…corrupt object — error: object file .git/objects/x is empty / fatal: loose object is corrupt (Git)corrupt objectError building the app bundle — Execution failed for task ':app:bundleRelease'. Error while executing bundletool (Android)Error building the …ClassCastException in SharedPreferences getString — java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString (Android)ClassCastException …Time Machine couldn't complete the backup — macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22 (macOS)Time Machine couldn…NullPointerException: Attempt to invoke virtual method on a null object reference — java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference (Android)NullPointerExceptio…UninitializedPropertyAccessException: lateinit property has not been initialized — kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized (Android)UninitializedProper…KSP: processor not found / unresolved reference to generated class — [ksp] Unresolved reference: AppDatabase_Impl (Android)KSP: processor not …Room: An entity must have at least 1 field annotated with @PrimaryKey — error: An entity must have at least 1 field annotated with @PrimaryKey (Android)Room: An entity mus…Room: Cannot figure out how to save this field into database — error: Cannot figure out how to save this field into database. You can consider adding a type converter for it. (Android)Room: Cannot figure…Modifying state during view update — SwiftUI: Modifying state during view update, this will cause undefined behavior (iOS)Modifying state dur…App Review Guideline 2.1: App Completeness — Guideline 2.1 - Performance - App Completeness: We discovered one or more bugs in your app (iOS)App Review Guidelin…Terminated due to memory issue (jetsam) — Termination Reason: ... per-process-limit / EXC_RESOURCE RESOURCE_TYPE_MEMORY (iOS)Terminated due to m…Gradle Java heap space — Gradle: Expiring Daemon because JVM heap space is exhausted / java.lang.OutOfMemoryError: Java heap space during build (Android)Gradle Java heap sp…OutOfMemoryError: Java heap space during dexing — Execution failed for task ':app:dexBuilderDebug' java.lang.OutOfMemoryError: Java heap space (Android)OutOfMemoryError: J…OutOfMemoryError: Failed to allocate a bitmap allocation — java.lang.OutOfMemoryError: Failed to allocate a 33177616 byte allocation with 16777216 free bytes (Android)OutOfMemoryError: F…BadTokenException — WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? (Android)BadTokenExceptionCan not perform this action after onSaveInstanceState — IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction) (Android)Can not perform thi…Fragment not attached to a context — IllegalStateException: Fragment x not attached to a context / not attached to an activity (Android)Fragment not attach…Room: There is a problem with the query: no such column — error: There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such column: userName) (Android)Room: There is a pr…SQLiteConstraintException: UNIQUE constraint failed — android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: user.email (code 2067 SQLITE_CONSTRAINT_UNIQUE) (Android)SQLiteConstraintExc…Room Flow/LiveData not emitting updates — (behavior) DAO Flow emits only once (Android)Room Flow/LiveData …Unresolved reference: kotlinx.android.synthetic — error: Unresolved reference: synthetic (Android)Unresolved referenc…Duplicate class — Duplicate class X found in modules A and B (Android)Duplicate classuses-sdk:minSdkVersion cannot be smaller than version declared in library — uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library (Android)uses-sdk:minSdkVers…Jetifier: Failed to transform artifact — Failed to transform artifact 'xyz.aar' to match attributes ... Jetifier (Android)Jetifier: Failed to…

Directly related (12)

Room cannot verify the data integrityAndroid

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.

Cannot access database on the main threadAndroid

Room: Cannot access database on the main thread since it may potentially lock the UI for a long period of time

A Room DAO query ran on the main thread; Room forbids it by default.

Core Data: Failed to load model named / Unresolved erroriOS

Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134060

The persistent store can't be opened or migrated.

CorruptionException: Unable to parse preferences protoAndroid

androidx.datastore.core.CorruptionException: Unable to parse preferences proto

The DataStore file on disk can't be read.

App crashes after restore on a new phoneAndroid

(behavior) crash on first launch after device transfer / Auto Backup

Restored app data is incompatible with the new device.

SQLiteDatabaseLockedException: database is lockedAndroid

android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY)

Another connection holds a write lock on the SQLite database.

SwiftData: Failed to create ModelContaineriOS

Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer)

SwiftData can't create or open the store.

CursorWindow: Window is full: requested allocation bytesAndroid

android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed

A query returned rows too big for the 2 MB cursor window.

IllegalStateException: Cannot perform this operation because the connection pool has been closedAndroid

java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase

The Room database was closed while a query ran.

SQLiteConstraintException: FOREIGN KEY constraint failedAndroid

android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)

A row references a parent that doesn't exist (or was deleted).

Room: AutoMigration requires a spec for renamed/deleted columnsAndroid

error: Schema 1 to 2 has a renamed/deleted column, an AutoMigration spec is required

Room can't infer a migration with renamed or deleted columns.

Class android.support.v4 not found after AndroidXAndroid

java.lang.NoClassDefFoundError: android/support/v4/app/Fragment

A library still uses old android.support classes that no longer exist in an AndroidX app.

Two steps away (34)

1146MySQL

MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist

The query references a table that MySQL can’t find in that database.

42P01PostgreSQL

PostgreSQL: ERROR: relation "x" does not exist

The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.

1022MySQL

MySQL ERROR 1022 (23000): Can't write; duplicate key in table

An ALTER/CREATE produced a duplicate key or constraint name — often a foreign key name that already exists in the database.

android:attr/lStar not foundAndroid

AAPT: error: resource android:attr/lStar not found

A dependency (androidx.core 1.7+) uses an attribute from Android 12 (API 31), but your module compiles against an older compileSd…

Android resource linking failedAndroid

AAPT: error: resource x (aka y) not found — Android resource linking failed

A layout, manifest or style references a resource (drawable, string, style, attribute) that doesn’t exist in the module or its de…

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

The app made a network call on the main (UI) thread, which Android forbids.

NSUnknownKeyExceptioniOS

NSUnknownKeyException: this class is not key value coding-compliant for the key x

A storyboard/XIB has a connection to an outlet or action that no longer exists in the class (renamed or deleted), or the view’s c…

Core Data: NSManagedObjectContext was accessed from the wrong queueiOS

CoreData: error: Serious application error. Exception was caught during Core Data change processing

A managed object or context was used on a different thread than it belongs to.

Core Data: constraint violation (NSConstraintConflict)iOS

Error Domain=NSCocoaErrorDomain Code=133021 "Could not merge changes." NSConstraintConflict

Two objects violate a uniqueness constraint.

corrupt objectGit

error: object file .git/objects/x is empty / fatal: loose object is corrupt

The local Git object database is corrupted — usually after a crash, disk full or sync tool interference.

Error building the app bundleAndroid

Execution failed for task ':app:bundleRelease'. Error while executing bundletool

Building the Android App Bundle (.aab) failed in the bundle step.

ClassCastException in SharedPreferences getStringAndroid

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString

A key was saved as one type and read as another.

Time Machine couldn't complete the backupmacOS

macOS: Time Machine couldn't complete the backup. / The backup disk image could not be mounted / Backup failed with error 18/19/21/22

A Time Machine backup stopped because the destination is unavailable, full, or the backup set is damaged.

NullPointerException: Attempt to invoke virtual method on a null object referenceAndroid

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

Code called a method on a view or object that was null, most often a findViewById that returned null.

UninitializedPropertyAccessException: lateinit property has not been initializedAndroid

kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized

A `lateinit var` was read before anything assigned it.

KSP: processor not found / unresolved reference to generated classAndroid

[ksp] Unresolved reference: AppDatabase_Impl

KSP did not run the annotation processor, so the generated class does not exist.

Room: An entity must have at least 1 field annotated with @PrimaryKeyAndroid

error: An entity must have at least 1 field annotated with @PrimaryKey

A Room @Entity has no primary key.

Room: Cannot figure out how to save this field into databaseAndroid

error: Cannot figure out how to save this field into database. You can consider adding a type converter for it.

Room doesn't know how to store a custom type column.

Modifying state during view updateiOS

SwiftUI: Modifying state during view update, this will cause undefined behavior

A @State/@Published value was changed while SwiftUI was computing a view’s body.

App Review Guideline 2.1: App CompletenessiOS

Guideline 2.1 - Performance - App Completeness: We discovered one or more bugs in your app

Review found crashes or broken features.

Terminated due to memory issue (jetsam)iOS

Termination Reason: ... per-process-limit / EXC_RESOURCE RESOURCE_TYPE_MEMORY

iOS killed the app for using too much memory.

Gradle Java heap spaceAndroid

Gradle: Expiring Daemon because JVM heap space is exhausted / java.lang.OutOfMemoryError: Java heap space during build

The Gradle daemon (or Kotlin daemon) ran out of memory compiling or dexing the project.

OutOfMemoryError: Java heap space during dexingAndroid

Execution failed for task ':app:dexBuilderDebug' java.lang.OutOfMemoryError: Java heap space

The Gradle daemon or dexer ran out of heap while building the app.

OutOfMemoryError: Failed to allocate a bitmap allocationAndroid

java.lang.OutOfMemoryError: Failed to allocate a 33177616 byte allocation with 16777216 free bytes

Loading a large image consumed more memory than the app may use.

BadTokenExceptionAndroid

WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

A dialog or popup was shown with a context whose Activity is finishing/destroyed, or with the Application context.

Can not perform this action after onSaveInstanceStateAndroid

IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction)

A FragmentTransaction (or DialogFragment.show/navigation) ran after the Activity saved its state, typically from an async callbac…

Fragment not attached to a contextAndroid

IllegalStateException: Fragment x not attached to a context / not attached to an activity

Code called requireContext()/requireActivity()/getString() after the Fragment was detached — usually in an async callback.

Room: There is a problem with the query: no such columnAndroid

error: There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such column: userName)

A @Query references a column that the entity doesn't have.

SQLiteConstraintException: UNIQUE constraint failedAndroid

android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: user.email (code 2067 SQLITE_CONSTRAINT_UNIQUE)

An insert or update violated a unique index or primary key.

Room Flow/LiveData not emitting updatesAndroid

(behavior) DAO Flow emits only once

The observed query doesn't re-emit after table changes.

Unresolved reference: kotlinx.android.syntheticAndroid

error: Unresolved reference: synthetic

Kotlin synthetic view imports were removed.

Duplicate classAndroid

Duplicate class X found in modules A and B

Two dependencies ship the same class — typically old Android Support libraries mixed with AndroidX, or Kotlin stdlib-jdk7/jdk8 ve…

uses-sdk:minSdkVersion cannot be smaller than version declared in libraryAndroid

uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library

A dependency needs a higher minSdk than the app declares.

Jetifier: Failed to transform artifactAndroid

Failed to transform artifact 'xyz.aar' to match attributes ... Jetifier

The Jetifier tool could not rewrite an old support-library dependency to AndroidX.