ActivityNotFoundException 🤖 Android

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.

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:

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