Error map

LifecycleOwner is attempting to register while current state is RESUMED java.lang.IllegalStateException: LifecycleOwner MainActivity is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.

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.

LifecycleOwner is attempting to register while current state is RESUMED — java.lang.IllegalStateException: LifecycleOwner MainActivity is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED. (Android)LifecycleOw…Can 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…State lost on rotation / activity recreated — (behavior) Activity restarts on rotation and fields reset (Android)State lost on rotat…startActivityForResult deprecated — 'startActivityForResult(Intent!, Int): Unit' is deprecated (Android)startActivityForRes…JobCancellationException: StandaloneCoroutine was cancelled — kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3 (Android)JobCancellationExce…CameraX: Camera use case binding failed — java.lang.IllegalArgumentException: Provided camera selector cannot be resolved / Use case binding failed (Android)CameraX: Camera use…WindowLeaked: Activity has leaked window — android.view.WindowLeaked: Activity com.example.MainActivity has leaked window DecorView@a1b2c3 that was originally added here (Android)WindowLeaked: Activ…Flow collected in lifecycleScope keeps running in background — (behavior) Flow collection continues after the app is stopped (Android)Flow collected in l…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…@ObservedObject recreated on every view update (use @StateObject) — (behavior) ViewModel resets when parent re-renders (iOS)@ObservedObject rec…SwiftUI .task / onAppear runs twice — (behavior) .onAppear is called more than once (iOS)SwiftUI .task / onA…Launcher activity not found / Default Activity not found — Error running 'app': Default Activity not found (Android)Launcher activity n…adb unauthorized — adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set (Android)adb unauthorizedno devices/emulators found — adb: no devices/emulators found / error: device not found (Android)no devices/emulator…android: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…ActivityNotFoundException — ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml? (Android)ActivityNotFoundExc…BadTokenException — WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? (Android)BadTokenExceptionIllegalStateException — java.lang.IllegalStateException (Java)IllegalStateExcepti…TransactionTooLargeException — android.os.TransactionTooLargeException: data parcel size x bytes (Android)TransactionTooLarge…setState() called after dispose() — Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted) (Flutter / Dart)setState() called a…BadParcelableException: ClassNotFoundException when unmarshalling — android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.Model (Android)BadParcelableExcept…FileUriExposedException: exposed beyond app through ClipData.Item.getUri — android.os.FileUriExposedException: file:///storage/emulated/0/photo.jpg exposed beyond app through ClipData.Item.getUri() (Android)FileUriExposedExcep…onBackPressed deprecated / predictive back not working — 'onBackPressed(): Unit' is deprecated. Deprecated in Java (Android)onBackPressed depre…NetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…ANR — ANR: Application Not Responding (Input dispatching timed out) (Android)ANRCompose Compiler requires a different Kotlin version — This version (1.5.3) of the Compose Compiler requires Kotlin version 1.9.10 but you appear to be using Kotlin version 1.9.0 (Android)Compose Compiler re…The emulator process for AVD was killed — Android Emulator: The emulator process for AVD x has terminated / was killed (hypervisor not available) (Android)The emulator proces…A Ticker was active when the State was disposed — Flutter: _HomeState#abc(ticker active) was disposed with an active Ticker. State.dispose() implementations must call dispose() on all their AnimationControllers (Flutter / Dart)A Ticker was active…dependOnInheritedWidgetOfExactType called before initState completed — Flutter: dependOnInheritedWidgetOfExactType<_InheritedTheme>() or dependOnInheritedElement() was called before _HomeState.initState() completed (Flutter / Dart)dependOnInheritedWi…TCP ZeroWindow / TCP Window Full — Networking: Wireshark: TCP ZeroWindow, TCP Window Full — the receiver can't keep up and tells the sender to stop (Networking)TCP ZeroWindow / TC…Many sockets in CLOSE_WAIT — Networking: Thousands of sockets in CLOSE_WAIT — the application is not closing its side of the connection (Networking)Many sockets in CLO…UninitializedPropertyAccessException: lateinit property has not been initialized — kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized (Android)UninitializedProper…AsyncTask deprecated / Handler() deprecated — 'AsyncTask<Params!, Progress!, Result!>' is deprecated. Deprecated in Java (Android)AsyncTask deprecate…Coroutine exception crashes the app (no handler) — FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.example, PID: 1234 (Android)Coroutine exception…Module with the Main dispatcher is missing — IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used (Android)Module with the Mai…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…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)IllegalStateExcepti…Modifying state during view update — SwiftUI: Modifying state during view update, this will cause undefined behavior (iOS)Modifying state dur…Publishing changes from background threads — SwiftUI: Publishing changes from background threads is not allowed; make sure to publish values from the main thread (iOS)Publishing changes …No ViewModelStoreOwner was provided via LocalViewModelStoreOwner — java.lang.IllegalStateException: No ViewModelStoreOwner was provided via LocalViewModelStoreOwner (Android)No ViewModelStoreOw…SwiftUI: No ObservableObject of type X found — Fatal error: No ObservableObject of type SessionStore found. A View.environmentObject(_:) for SessionStore may be missing as an ancestor of this view. (iOS)SwiftUI: No Observa…ForEach: the ID occurs multiple times — ForEach<Array<Item>, String, Text>: the ID abc occurs multiple times within the collection, this will give undefined results! (iOS)ForEach: the ID occ…Background task expired / beginBackgroundTask — Background Task 123 ("Task"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination (iOS)Background task exp…Manifest merger failed — Manifest merger failed: android:exported needs to be explicitly specified (Android)Manifest merger fai…uses-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…INSTALL_FAILED_MISSING_SHARED_LIBRARY — Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY] (Android)INSTALL_FAILED_MISS…

Directly related (12)

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.

State lost on rotation / activity recreatedAndroid

(behavior) Activity restarts on rotation and fields reset

The screen rotation destroys and recreates the Activity, losing in-memory state.

startActivityForResult deprecatedAndroid

'startActivityForResult(Intent!, Int): Unit' is deprecated

Use the Activity Result API instead of request codes.

JobCancellationException: StandaloneCoroutine was cancelledAndroid

kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3

A coroutine was cancelled, usually because its scope ended.

CameraX: Camera use case binding failedAndroid

java.lang.IllegalArgumentException: Provided camera selector cannot be resolved / Use case binding failed

CameraX couldn't bind a use case to the requested camera.

WindowLeaked: Activity has leaked windowAndroid

android.view.WindowLeaked: Activity com.example.MainActivity has leaked window DecorView@a1b2c3 that was originally added here

A dialog was still showing when its Activity was destroyed.

Flow collected in lifecycleScope keeps running in backgroundAndroid

(behavior) Flow collection continues after the app is stopped

Collecting a Flow with `lifecycleScope.launch` doesn't stop when the UI is hidden.

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.

@ObservedObject recreated on every view update (use @StateObject)iOS

(behavior) ViewModel resets when parent re-renders

An `@ObservedObject` owned by the view is recreated whenever the view is.

SwiftUI .task / onAppear runs twiceiOS

(behavior) .onAppear is called more than once

A view appears several times, so `onAppear` repeats.

Launcher activity not found / Default Activity not foundAndroid

Error running 'app': Default Activity not found

Android Studio can't find an Activity with the LAUNCHER intent filter.

Two steps away (36)

adb unauthorizedAndroid

adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set

The phone hasn’t accepted your computer’s RSA key for USB debugging yet.

no devices/emulators foundAndroid

adb: no devices/emulators found / error: device not found

adb can’t see any connected device or running emulator.

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…

ActivityNotFoundExceptionAndroid

ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml?

An Intent targets an Activity that isn’t declared in the manifest, or an implicit intent has no app to handle it.

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.

IllegalStateExceptionJava

java.lang.IllegalStateException

A method was called when the object wasn’t in the right state for it.

TransactionTooLargeExceptionAndroid

android.os.TransactionTooLargeException: data parcel size x bytes

Too much data was put into a Bundle/Intent/saved state, exceeding the ~1 MB Binder transaction buffer.

setState() called after dispose()Flutter / Dart

Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted)

An async callback (network, timer, stream) finished after the widget was removed and then called setState.

BadParcelableException: ClassNotFoundException when unmarshallingAndroid

android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.Model

A Parcelable in a Bundle or Intent couldn't be restored because its class was not found.

FileUriExposedException: exposed beyond app through ClipData.Item.getUriAndroid

android.os.FileUriExposedException: file:///storage/emulated/0/photo.jpg exposed beyond app through ClipData.Item.getUri()

A file:// URI was shared with another app, which Android 7+ forbids.

onBackPressed deprecated / predictive back not workingAndroid

'onBackPressed(): Unit' is deprecated. Deprecated in Java

The old back handling API is deprecated, and predictive back needs the new dispatcher.

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

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

ANRAndroid

ANR: Application Not Responding (Input dispatching timed out)

The main thread was blocked for about 5 seconds (input) or a broadcast/service took too long, so Android showed “App isn’t respon…

Compose Compiler requires a different Kotlin versionAndroid

This version (1.5.3) of the Compose Compiler requires Kotlin version 1.9.10 but you appear to be using Kotlin version 1.9.0

The Compose compiler plugin is tied to one exact Kotlin release and yours differs.

The emulator process for AVD was killedAndroid

Android Emulator: The emulator process for AVD x has terminated / was killed (hypervisor not available)

The Android Emulator crashed or couldn’t start — usually missing hardware acceleration, low disk/RAM, or GPU driver problems.

A Ticker was active when the State was disposedFlutter / Dart

Flutter: _HomeState#abc(ticker active) was disposed with an active Ticker. State.dispose() implementations must call dispose() on all their AnimationControllers

An `AnimationController` was still running when its `State` was disposed, because `dispose()` did not release it.

dependOnInheritedWidgetOfExactType called before initState completedFlutter / Dart

Flutter: dependOnInheritedWidgetOfExactType<_InheritedTheme>() or dependOnInheritedElement() was called before _HomeState.initState() completed

`Theme.of(context)`, `MediaQuery.of(context)` or `Provider.of(context)` was used in `initState`, where inherited widgets are not…

TCP ZeroWindow / TCP Window FullNetworking

Networking: Wireshark: TCP ZeroWindow, TCP Window Full — the receiver can't keep up and tells the sender to stop

The receiving application isn't reading data fast enough, so its TCP buffer filled and the sender must pause.

Many sockets in CLOSE_WAITNetworking

Networking: Thousands of sockets in CLOSE_WAIT — the application is not closing its side of the connection

The other end closed the connection, but your program never called close(), so the socket stays open.

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.

AsyncTask deprecated / Handler() deprecatedAndroid

'AsyncTask<Params!, Progress!, Result!>' is deprecated. Deprecated in Java

AsyncTask is removed from the recommended APIs.

Coroutine exception crashes the app (no handler)Android

FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.example, PID: 1234

An uncaught exception in a `launch` coroutine kills the process.

Module with the Main dispatcher is missingAndroid

IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used

`Dispatchers.Main` was used in a unit test without a test dispatcher.

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.

IllegalStateException: A migration from 1 to 2 was required but not foundAndroid

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

The Room schema version increased but no migration describes how to upgrade existing data.

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.

Publishing changes from background threadsiOS

SwiftUI: Publishing changes from background threads is not allowed; make sure to publish values from the main thread

An ObservableObject’s @Published property was updated from a background thread.

No ViewModelStoreOwner was provided via LocalViewModelStoreOwnerAndroid

java.lang.IllegalStateException: No ViewModelStoreOwner was provided via LocalViewModelStoreOwner

`viewModel()` was called from a composable that has no ViewModel store, such as a Preview or ComposeView without an owner.

SwiftUI: No ObservableObject of type X foundiOS

Fatal error: No ObservableObject of type SessionStore found. A View.environmentObject(_:) for SessionStore may be missing as an ancestor of this view.

A view reads an `@EnvironmentObject` that no parent provided.

ForEach: the ID occurs multiple timesiOS

ForEach<Array<Item>, String, Text>: the ID abc occurs multiple times within the collection, this will give undefined results!

ForEach items share the same id.

Background task expired / beginBackgroundTaskiOS

Background Task 123 ("Task"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination

A background task ran too long.

Manifest merger failedAndroid

Manifest merger failed: android:exported needs to be explicitly specified

Targeting Android 12 (API 31)+ requires `android:exported` on every activity, service or receiver that has an intent-filter.

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.

INSTALL_FAILED_MISSING_SHARED_LIBRARYAndroid

Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

The app requires a `uses-library` that this device or emulator image doesn't have.