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 tccpg288
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via xamarin.com by Unknown author, 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 GitHub by negue
, 1 year ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by freaksandgeeks
, 2 years ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by Kirmani88
, 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 android.support.v7.app.AppCompatDialog.setContentView(AppCompatDialog.java:80)
at android.support.v7.app.AlertController.installContent(AlertController.java:214)
at android.app.Dialog.dispatchOnCreate(Dialog.java:397)
at android.app.Dialog.show(Dialog.java:295)
at com.troychuinard.fanpolls.NewImageActivity$MyAdapter$1.onClick(NewImageActivity.java:243)
at android.view.View.performClick(View.java:5210)
at android.view.View$PerformClick.run(View.java:21294)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)

Users with the same issue

7 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
468 times, 10 months ago
Once, 11 months ago

Write tip

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