java.lang.RuntimeException

Unable to start activity ComponentInfo{com.example.android.app/com.example.android.app.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web71

Stack trace

  • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.app/com.example.android.app.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3149) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3248) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5146) at android.app.ActivityThread.access$1100(ActivityThread.java:197) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1687) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6872) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by: 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.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.android.app.MainActivity.onCreate(MainActivity.java:70) at android.app.Activity.performCreate(Activity.java:6550) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3102)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

BennyBenny
10 times, last one
danleyb2Interinteldanleyb2Interintel
4 times, last one
Unknown visitor
Unknown visitorOnce,
syntech16syntech16
Once,
Indri YunitaIndri Yunita
Once,
10 more bugmates