Error map
Type mismatch: inferred type is X but Y was expected error: Type mismatch: inferred type is String? but String was expected
Android · layer 1, On your device
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.
Directly related (11)
java.lang.ClassCastException: class A cannot be cast to class B
An object was cast to a type it isn’t.
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.
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: 'nil' requires a contextual type
Swift can't infer the type of a bare `nil`.
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.
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.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.
error: 'when' expression must be exhaustive, add necessary 'is Loading' branch or 'else' branch instead
A `when` used as an expression doesn't cover all sealed subclasses.
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.
error: ambiguous use of 'init(content:)'
Overloads match the call equally.
kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3
A coroutine was cancelled, usually because its scope ended.
Two steps away (29)
java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5
substring()/charAt() used an index outside the string.
java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable)
Code tried to modify an immutable or fixed-size collection.
java.io.IOException: Stream closed
Code read or wrote a stream after it was closed — often by a try-with-resources block or a wrapper closing the underlying stream.
Swift: Cannot convert value of type 'X' to expected argument type 'Y'
The value’s type doesn’t match what the function or property expects.
Dart/Flutter: Null check operator used on a null value
The ! operator was applied to a variable that was null at runtime.
Dart: Bad state: No element — .first, .last or .single on an empty list
You called `.first`, `.last`, `.single` or `.reduce` on an empty collection.
Gradle: Could not resolve all files for configuration / Could not resolve dependency
Gradle couldn’t download a dependency — wrong coordinates/version, missing repository, offline mode, or network/proxy issues.
Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run
The JDK running Gradle doesn’t match what the Gradle version or Android Gradle Plugin (AGP) supports.
java.lang.UnsupportedClassVersionError: class file version 61.0, this version of the Java Runtime only recognizes up to 55.0
Code compiled for a newer Java version is running on an older JVM.
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.
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.
error: Missing return in a function expected to return 'Int'
A code path in your function ends without returning a value.
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.
kotlin.UninitializedPropertyAccessException: lateinit property adapter has not been initialized
A `lateinit var` was read before anything assigned it.
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.
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…
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…
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 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…
Execution failed for task ':app:bundleRelease'. Error while executing bundletool
Building the Android App Bundle (.aab) failed in the bundle step.
2 files found with path 'META-INF/LICENSE.md' from inputs
Two dependencies ship the same file and packaging can't choose one.
com.squareup.moshi.JsonDataException: Required value 'name' missing at $.user
A non-null Kotlin property had no value in the JSON.
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.
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 branches.
The branch name you gave matches several refs.
error: Switch must be exhaustive / add missing case: '.pending'
A `switch` doesn't cover every enum case.
android.os.NetworkOnMainThreadException
The app made a network call on the main (UI) thread, which Android forbids.
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…
java.lang.IllegalArgumentException: Provided camera selector cannot be resolved / Use case binding failed
CameraX couldn't bind a use case to the requested camera.