Error map

when expression must be exhaustive (sealed class) error: 'when' expression must be exhaustive, add necessary 'is Loading' branch or 'else' branch instead

Android · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). 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.

when expression must be exhaustive (sealed class) — error: 'when' expression must be exhaustive, add necessary 'is Loading' branch or 'else' branch instead (Android)when expres…'nil' requires a contextual type / Cannot infer type — error: 'nil' requires a contextual type (iOS)'nil' requires a co…UninitializedPropertyAccessException: lateinit property has not been initialized — kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized (Android)UninitializedProper…MissingFieldException: Field 'x' is required — kotlinx.serialization.MissingFieldException: Field 'id' is required for type with serial name 'com.example.User', but it was missing (Android)MissingFieldExcepti…NullPointerException: Parameter specified as non-null is null — java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter intent (Android)NullPointerExceptio…Smart cast to 'X' is impossible, because 'y' is a mutable property that could have been changed by this time — error: Smart cast to 'String' is impossible, because 'name' is a mutable property that could have been changed by this time (Android)Smart cast to 'X' i…Compose 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…Duplicate class kotlin.collections found in modules — Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 and kotlin-stdlib-jdk8-1.7.10 (Android)Duplicate class kot…Moshi: JsonDataException: Required value missing — com.squareup.moshi.JsonDataException: Required value 'name' missing at $.user (Android)Moshi: JsonDataExce…Type mismatch: inferred type is X but Y was expected — error: Type mismatch: inferred type is String? but String was expected (Android)Type mismatch: infe…Ambiguous use of 'init' / trailing closure — error: ambiguous use of 'init(content:)' (iOS)Ambiguous use of 'i…JobCancellationException: StandaloneCoroutine was cancelled — kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3 (Android)JobCancellationExce…Type of expression is ambiguous — Swift: Type of expression is ambiguous without a type annotation (more context) (iOS)Type of expression …Value of optional type must be unwrapped — error: Value of optional type 'String?' must be unwrapped to a value of type 'String' (iOS)Value of optional t…Missing return in a function expected to return — error: Missing return in a function expected to return 'Int' (iOS)Missing return in a…Can not perform this action after onSaveInstanceState — IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction) (Android)Can not perform thi…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…BadParcelableException: ClassNotFoundException when unmarshalling — android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.Model (Android)BadParcelableExcept…NumberFormatException — java.lang.NumberFormatException: For input string: "x" (Java)NumberFormatExcepti…DateTimeParseException — java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2 (Java)DateTimeParseExcept…Unparseable date — java.text.ParseException: Unparseable date: "x" (Java)Unparseable dateClassCastException: cannot be cast to android.widget — java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView (Android)ClassCastException:…App crashes after restore on a new phone — (behavior) crash on first launch after device transfer / Auto Backup (Android)App crashes after r…ConcurrentModificationException while iterating — java.util.ConcurrentModificationException at java.util.ArrayList$Itr.next (Android)ConcurrentModificat…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…incompatible version of Kotlin — Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.0.0, expected version is 1.8.0 (Android)incompatible versio…Duplicate class — Duplicate class X found in modules A and B (Android)Duplicate classInconsistent JVM-target compatibility — Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'compileDebugKotlin' (1.8) (Android)Inconsistent JVM-ta…Error building the app bundle — Execution failed for task ':app:bundleRelease'. Error while executing bundletool (Android)Error building the …type 'Null' is not a subtype of type 'String' — Dart: type 'Null' is not a subtype of type 'String' in type cast (Flutter / Dart)type 'Null' is not …type '_InternalLinkedHashMap' is not a subtype of type 'List<dynamic>' — Dart: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast (Flutter / Dart)type '_InternalLink…FormatException: Unexpected character — Dart: FormatException: Unexpected character (at character 1) <!DOCTYPE html> — jsonDecode of an HTML page (Flutter / Dart)FormatException: Un…ClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionThe argument type can't be assigned to the parameter type — Dart: The argument type 'String?' can't be assigned to the parameter type 'String' (Flutter / Dart)The argument type c…warning: refname 'v1' is ambiguous — warning: refname 'release' is ambiguous. Git normally never creates a ref that ends with 40 hex characters (Git)warning: refname 'v…fatal: Cannot rebase onto multiple branches — fatal: Cannot rebase onto multiple branches. (Git)fatal: Cannot rebas…Switch must be exhaustive — error: Switch must be exhaustive / add missing case: '.pending' (iOS)Switch must be exha…NetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…ANR — ANR: Application Not Responding (Input dispatching timed out) (Android)ANRCameraX: Camera use case binding failed — java.lang.IllegalArgumentException: Provided camera selector cannot be resolved / Use case binding failed (Android)CameraX: Camera use…

Directly related (11)

'nil' requires a contextual type / Cannot infer typeiOS

error: 'nil' requires a contextual type

Swift can't infer the type of a bare `nil`.

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.

MissingFieldException: Field 'x' is requiredAndroid

kotlinx.serialization.MissingFieldException: Field 'id' is required for type with serial name 'com.example.User', but it was missing

A required property wasn't present in the JSON being decoded.

NullPointerException: Parameter specified as non-null is nullAndroid

java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter intent

Java code passed null to a Kotlin parameter that is non-null.

Smart cast to 'X' is impossible, because 'y' is a mutable property that could have been changed by this timeAndroid

error: Smart cast to 'String' is impossible, because 'name' is a mutable property that could have been changed by this time

Kotlin can't smart-cast a `var` property that may change.

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.

Duplicate class kotlin.collections found in modulesAndroid

Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 and kotlin-stdlib-jdk8-1.7.10

Two Kotlin stdlib artifacts contain the same classes and conflict at build time.

Moshi: JsonDataException: Required value missingAndroid

com.squareup.moshi.JsonDataException: Required value 'name' missing at $.user

A non-null Kotlin property had no value in the JSON.

Type mismatch: inferred type is X but Y was expectedAndroid

error: Type mismatch: inferred type is String? but String was expected

A nullable value is passed where non-null is required (or vice versa).

Ambiguous use of 'init' / trailing closureiOS

error: ambiguous use of 'init(content:)'

Overloads match the call equally.

JobCancellationException: StandaloneCoroutine was cancelledAndroid

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

A coroutine was cancelled, usually because its scope ended.

Two steps away (29)

Type of expression is ambiguousiOS

Swift: Type of expression is ambiguous without a type annotation (more context)

The compiler can’t infer which type you mean — often because of a typo or a wrong argument elsewhere in the expression.

Value of optional type must be unwrappediOS

error: Value of optional type 'String?' must be unwrapped to a value of type 'String'

You used an optional where a non-optional value is required.

Missing return in a function expected to returniOS

error: Missing return in a function expected to return 'Int'

A code path in your function ends without returning a value.

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…

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.

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.

NumberFormatExceptionJava

java.lang.NumberFormatException: For input string: "x"

A string couldn’t be parsed as a number — it’s empty, has spaces/commas, is too large, or isn’t numeric.

DateTimeParseExceptionJava

java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2

A java.time parse call got text that doesn’t match the expected format.

Unparseable dateJava

java.text.ParseException: Unparseable date: "x"

SimpleDateFormat couldn’t parse the string with its pattern.

ClassCastException: cannot be cast to android.widgetAndroid

java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView

A view id in the layout is a different widget type than the one the code expects.

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.

ConcurrentModificationException while iteratingAndroid

java.util.ConcurrentModificationException at java.util.ArrayList$Itr.next

A collection was changed while it was being iterated.

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…

incompatible version of KotlinAndroid

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.0.0, expected version is 1.8.0

A dependency was compiled with a newer Kotlin version than your project’s Kotlin Gradle plugin can read.

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…

Inconsistent JVM-target compatibilityAndroid

Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'compileDebugKotlin' (1.8)

Java and Kotlin compile tasks target different JVM bytecode versions in the same module.

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.

type 'Null' is not a subtype of type 'String'Flutter / Dart

Dart: type 'Null' is not a subtype of type 'String' in type cast

A value that was `null` at runtime was cast or used as a non-nullable type, most often when parsing JSON.

type '_InternalLinkedHashMap' is not a subtype of type 'List<dynamic>'Flutter / Dart

Dart: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast

JSON decoded to a Map but your code expected a List (or the other way round).

FormatException: Unexpected characterFlutter / Dart

Dart: FormatException: Unexpected character (at character 1) <!DOCTYPE html> — jsonDecode of an HTML page

`jsonDecode` received something that is not JSON, commonly an HTML error page, an empty string, or a plain-text message.

ClassCastExceptionJava

java.lang.ClassCastException: class A cannot be cast to class B

An object was cast to a type it isn’t.

The argument type can't be assigned to the parameter typeFlutter / Dart

Dart: The argument type 'String?' can't be assigned to the parameter type 'String'

You passed a value whose type does not match what the function parameter requires.

warning: refname 'v1' is ambiguousGit

warning: refname 'release' is ambiguous. Git normally never creates a ref that ends with 40 hex characters

A branch and a tag share a name.

fatal: Cannot rebase onto multiple branchesGit

fatal: Cannot rebase onto multiple branches.

The branch name you gave matches several refs.

Switch must be exhaustiveiOS

error: Switch must be exhaustive / add missing case: '.pending'

A `switch` doesn't cover every enum case.

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…

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.