ActivityNotFoundException Android Origin: On your device Last updated 15 Oct 2026

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.

Exact message you may see Unable to find explicit activity classhave you declared this activity in your AndroidManifest.xmlNo Activity found to handle Intent
Seen on: Android

Meaning

Every Activity must be listed in AndroidManifest.xml. For implicit intents (open URL, share, camera) there may be no installed app, and on Android 11+ package visibility can hide handlers.

Common causes

  • Activity missing from AndroidManifest.xml
  • Wrong package/class name
  • No app installed to handle the implicit intent
  • Android 11+ package visibility (<queries> missing)

⚡ Quick fix

  1. Declare the activity in the manifest
  2. Wrap implicit startActivity in try/catch
  3. Add <queries> for intents you resolve

Detailed fix by platform

XML

  1. kotlin
    <activity android:name=".SettingsActivity" android:exported="false" />
    <queries>
      <intent><action android:name="android.intent.action.VIEW" /><data android:scheme="https" /></intent>
    </queries>

How to diagnose

  1. Manifest — Activity declared?
  2. Intent — Explicit or implicit?
  3. Device — Handler app installed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

adb server version doesn't match — adb server version (41) doesn't match this client (39); killing... (Android)adb server version do…adb unauthorized — adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set (Android)adb unauthorizedAndroid resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource link…android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar no…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 this …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 databas…FLAG_IMMUTABLE or FLAG_MUTABLE — Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent (Android)FLAG_IMMUTABLE or FLA…ActivityN…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.