java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Ahmed Mujtaba
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by user1517108
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.**
via Stack Overflow by Hudson Worden
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by Kiran Raju
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via GitHub by espiguilla
, 11 months ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by Soheil Afshari
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:343)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
at md5aac27d1f54e5651bf56c7cf1fe703c82.MainActivity.n_onCreate(Native Method)
at md5aac27d1f54e5651bf56c7cf1fe703c82.MainActivity.onCreate(MainActivity.java:28)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4441)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)

Users with the same issue

10 times, 1 year ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 6 months ago
Once, 8 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.