The style on this component requires your app theme to be Theme.MaterialComponents Android Origin: On your device OSI layer 7 · Application Last updated 25 Nov 2026

java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant)

A Material component is used under a non-Material theme.

Exact message you may see The style on this component requires your app theme to be Theme.MaterialComponentsTheme.MaterialComponents (or a descendant)MaterialButton theme errorjava.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant).
Seen on: Android

Meaning

Material buttons, text fields and cards need a Material theme. Switch your app theme parent or use the Theme.AppCompat.*.Bridge variant while migrating.

Common causes

  • App theme parent is AppCompat only
  • Component in a dialog with another theme
  • Mixed theme in a ContextThemeWrapper

⚡ Quick fix

  1. Use Theme.Material3 or Theme.MaterialComponents
  2. Use the .Bridge theme temporarily
  3. Apply the Material theme to the dialog too

Detailed fix by platform

XML

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

How to diagnose

  1. Theme — parent?
  2. Dialog — themed?
  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…AVAudioEngine: required condition is false: format.sampleRate == hwFormat.sampleRate — Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate' (iOS)AVAudioEngine: requir…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…Core Data: NSManagedObjectContext was accessed from the wrong queue — CoreData: error: Serious application error. Exception was caught during Core Data change processing (iOS)Core Data: NSManagedO…The style…

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.