Error map

Hilt: Hilt Activity must be attached to an @AndroidEntryPoint Application java.lang.IllegalStateException: Hilt Activity must be attached to an @AndroidEntryPoint Application

Android · layer 1, On your device

Open the full error page →

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

Hilt: Hilt Activity must be attached to an @AndroidEntryPoint Application — java.lang.IllegalStateException: Hilt Activity must be attached to an @AndroidEntryPoint Application (Android)Hilt: Hilt …Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource li…android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar …WorkManager: Could not create Worker — androidx.work.WorkerFactory: Could not instantiate com.example.SyncWorker / NoSuchMethodException: SyncWorker.<init> [Context, WorkerParameters] (Android)WorkManager: Could …Dagger: ... scoped with different scope than component — error: [Dagger/IncompatiblyScopedBindings] SingletonComponent scoped with @ActivityScoped may not reference bindings with different scopes (Android)Dagger: ... scoped …kapt: error type was incorrect / cannot find symbol — error: cannot find symbol class DaggerAppComponent / kaptDebugKotlin FAILED (Android)kapt: error type wa…Hilt: @HiltViewModel with assisted injection factory missing — Cannot create an instance of class: Hilt assisted ViewModel requires creationCallback (Android)Hilt: @HiltViewMode…Error building the app bundle — Execution failed for task ':app:bundleRelease'. Error while executing bundletool (Android)Error building the …RuntimeException: Cannot create an instance of class ViewModel — java.lang.RuntimeException: Cannot create an instance of class com.example.MainViewModel Caused by: java.lang.NoSuchMethodException: MainViewModel.<init> [] (Android)RuntimeException: C…Dagger/MissingBinding: cannot be provided without an @Inject constructor — error: [Dagger/MissingBinding] com.example.Repository cannot be provided without an @Inject constructor or an @Provides-annotated method (Android)Dagger/MissingBindi…Could not resolve — Gradle: Could not resolve all files for configuration / Could not resolve dependency (Android)Could not resolveManifest merger failed — Manifest merger failed: android:exported needs to be explicitly specified (Android)Manifest merger fai…Duplicate class — Duplicate class X found in modules A and B (Android)Duplicate classUnsupported class file major version — Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run (Android)Unsupported class f…FailedScheduling — Kubernetes: Pod stuck in Pending — FailedScheduling: 0/3 nodes are available (Kubernetes)FailedSchedulingEvicted — Kubernetes: Pod Evicted — The node was low on resource: memory / ephemeral-storage (Kubernetes)EvictedstartForeground not called — Context.startForegroundService() did not then call Service.startForeground() / ForegroundServiceStartNotAllowedException (Android)startForeground not…IllegalStateException: Not allowed to start service Intent (app is in background) — java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.example/.SyncService }: app is in background uid UidRecord{...} (Android)IllegalStateExcepti…WorkManager work never runs (constraints not met) — WM-WorkerWrapper: Work [ id=… ] was cancelled / state ENQUEUED (Android)WorkManager work ne…DHCPDISCOVER: no free leases — Networking: dhcpd: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via eth0: network 192.168.1.0/24: no free leases (Networking)DHCPDISCOVER: no fr…Coroutine exception crashes the app (no handler) — FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.example, PID: 1234 (Android)Coroutine exception…Android Gradle plugin requires a newer Gradle — The Android Gradle plugin supports only Gradle version 8.x and higher. Current Gradle version is 7.x (Android)Android Gradle plug…Android Gradle plugin requires Java 17 — Android Gradle plugin requires Java 17 to run. You are currently using Java 11 (Android)Android Gradle plug…KSP: processor not found / unresolved reference to generated class — [ksp] Unresolved reference: AppDatabase_Impl (Android)KSP: processor not …No ViewModelStoreOwner was provided via LocalViewModelStoreOwner — java.lang.IllegalStateException: No ViewModelStoreOwner was provided via LocalViewModelStoreOwner (Android)No ViewModelStoreOw…State lost on rotation / activity recreated — (behavior) Activity restarts on rotation and fields reset (Android)State lost on rotat…@ObservedObject recreated on every view update (use @StateObject) — (behavior) ViewModel resets when parent re-renders (iOS)@ObservedObject rec…Failed to find target with hash string — Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted (Android)Failed to find targ…Minimum supported Gradle version — Minimum supported Gradle version is 8.7. Current version is 8.2 (Android)Minimum supported G…Namespace not specified — Namespace not specified. Specify a namespace in the module's build file (AGP 8) (Android)Namespace not speci…Fragment not attached to a context — IllegalStateException: Fragment x not attached to a context / not attached to an activity (Android)Fragment not attach…ClassCastException: cannot be cast to android.widget — java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView (Android)ClassCastException:…BadParcelableException: ClassNotFoundException when unmarshalling — android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.Model (Android)BadParcelableExcept…

Directly related (9)

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…

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…

WorkManager: Could not create WorkerAndroid

androidx.work.WorkerFactory: Could not instantiate com.example.SyncWorker / NoSuchMethodException: SyncWorker.<init> [Context, WorkerParameters]

WorkManager can't construct your Worker with its default factory.

Dagger: ... scoped with different scope than componentAndroid

error: [Dagger/IncompatiblyScopedBindings] SingletonComponent scoped with @ActivityScoped may not reference bindings with different scopes

A binding's scope doesn't match the component that uses it.

kapt: error type was incorrect / cannot find symbolAndroid

error: cannot find symbol class DaggerAppComponent / kaptDebugKotlin FAILED

Annotation processing with kapt failed, so generated classes such as Dagger or Room code are missing.

Hilt: @HiltViewModel with assisted injection factory missingAndroid

Cannot create an instance of class: Hilt assisted ViewModel requires creationCallback

A ViewModel with assisted parameters needs a factory callback.

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.

RuntimeException: Cannot create an instance of class ViewModelAndroid

java.lang.RuntimeException: Cannot create an instance of class com.example.MainViewModel Caused by: java.lang.NoSuchMethodException: MainViewModel.<init> []

The default ViewModel factory can only build a ViewModel with a no-argument (or Application) constructor.

Dagger/MissingBinding: cannot be provided without an @Inject constructorAndroid

error: [Dagger/MissingBinding] com.example.Repository cannot be provided without an @Inject constructor or an @Provides-annotated method

Dagger or Hilt has no way to create a requested type.

Two steps away (23)

Could not resolveAndroid

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.

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.

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…

Unsupported class file major versionAndroid

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.

FailedSchedulingKubernetes

Kubernetes: Pod stuck in Pending — FailedScheduling: 0/3 nodes are available

The scheduler can’t find a node that satisfies the pod’s resource requests, selectors, taints or volume constraints.

EvictedKubernetes

Kubernetes: Pod Evicted — The node was low on resource: memory / ephemeral-storage

The kubelet removed the pod because its node ran short of memory or disk.

startForeground not calledAndroid

Context.startForegroundService() did not then call Service.startForeground() / ForegroundServiceStartNotAllowedException

A foreground service didn’t call startForeground() within a few seconds, or the app tried to start one from the background where…

IllegalStateException: Not allowed to start service Intent (app is in background)Android

java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.example/.SyncService }: app is in background uid UidRecord{...}

Since Android 8 background apps can't freely start services.

WorkManager work never runs (constraints not met)Android

WM-WorkerWrapper: Work [ id=… ] was cancelled / state ENQUEUED

A scheduled task stays enqueued and doesn't execute.

DHCPDISCOVER: no free leasesNetworking

Networking: dhcpd: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via eth0: network 192.168.1.0/24: no free leases

The DHCP server has no unused addresses left in the scope.

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.

Android Gradle plugin requires a newer GradleAndroid

The Android Gradle plugin supports only Gradle version 8.x and higher. Current Gradle version is 7.x

The Android Gradle plugin (AGP) in your build needs a newer Gradle than the wrapper provides.

Android Gradle plugin requires Java 17Android

Android Gradle plugin requires Java 17 to run. You are currently using Java 11

This AGP version runs on JDK 17 (or newer) and Gradle is currently started with an older JDK.

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.

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.

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.

@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.

Failed to find target with hash stringAndroid

Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted

Gradle needs an SDK platform/build-tools that isn’t installed, or the licences haven’t been accepted on this machine.

Minimum supported Gradle versionAndroid

Minimum supported Gradle version is 8.7. Current version is 8.2

The Android Gradle Plugin (AGP) version in your build needs a newer Gradle wrapper version.

Namespace not specifiedAndroid

Namespace not specified. Specify a namespace in the module's build file (AGP 8)

AGP 8 requires android { namespace = "…" } in each module’s build file; the package attribute in AndroidManifest.xml is no longer…

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.

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.

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.