IllegalStateException: This Activity already has an action bar supplied by the window decor Android Origin: On your device OSI layer 7 · Application Last updated 25 Nov 2026

java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your them...

You called setSupportActionBar(toolbar) while the theme also has an ActionBar.

Exact message you may see This Activity already has an action bar supplied by the window decorwindowActionBar false Toolbar
Seen on: Android

Meaning

Use a Theme.*.NoActionBar parent, or remove setSupportActionBar.

Common causes

  • Theme with ActionBar
  • Toolbar added in layout
  • Mixed themes

⚡ Quick fix

  1. Use Theme.Material3.DayNight.NoActionBar
  2. Remove setSupportActionBar
  3. Set windowActionBar false

Detailed fix by platform

XML

  1. <style name="Theme.App" parent="Theme.Material3.DayNight.NoActionBar"/>

How to diagnose

  1. Theme — NoActionBar?
  2. Toolbar — custom?
  3. Night — same?

🔧 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):

An instance was deallocated while key value observers were still registered — NSInternalInconsistencyException: An instance 0x7f of class Foo was deallocated while key value observers were still registered with it (iOS)An instance was deall…Android 12 splash screen shows twice / wrong icon — (behavior) Two splash screens appear on Android 12+ (Android)Android 12 splash scr…App crashes after restore on a new phone — (behavior) crash on first launch after device transfer / Auto Backup (Android)App crashes after res…BadParcelableException: ClassNotFoundException when unmarshalling — android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.Model (Android)BadParcelableExceptio…ClassCastException: cannot be cast to android.widget — java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView (Android)ClassCastException: c…ConcurrentModificationException while iterating — java.util.ConcurrentModificationException at java.util.ArrayList$Itr.next (Android)ConcurrentModificatio…Crash report not symbolicated (missing dSYM) — Crashlytics: Missing dSYM — upload dSYMs to see readable stack traces (iOS)Crash report not symb…EXC_BAD_ACCESS: message sent to deallocated instance — -[Foo bar]: message sent to deallocated instance 0x600000 (iOS)EXC_BAD_ACCESS: messa…IllegalSt…

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.