java.lang.RuntimeException: Unable to start activity ComponentInfo{Activities.MyAcitivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 1

Stack Overflow | user2384694 | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    Try setting windowActionBar to false with "<item name="windowActionBar">false</item>" or change Theme.AppCompat.Light.DarkActionBar to Theme.AppCompat.Light.NoActionBar in your styles.xml
  2. 0
    samebug tip
    As of SDK 23, you have to call this method with ContextCompat.getColor(context, R.color.my_color) so it works with previous API as well. Also, you have to add the support V4 library to your dependencies: "compile 'com.android.support:support-v4:23.0.1'"
  3. 0

    Android error on startup

    Stack Overflow | 2 years ago | We're All Mad Here
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.app.myapplication/com.android.app.myapplication.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable to resolve error Theme.AppCompat theme (or descendant)

    Stack Overflow | 2 months ago | user2384694
    java.lang.RuntimeException: Unable to start activity ComponentInfo{Activities.MyAcitivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 1
  6. 0

    Cannot use this library when you're using the new Google Toolbar.

    GitHub | 2 years ago | forlayo
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.blabla/com.blabla.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    You need to use a Theme.AppCompat theme (or descendant) with this activity. 15

    at android.support.v7.app.AppCompatDelegateImplV7.i()
  2. Android v7
    AppCompatActivity.setContentView
    1. android.support.v7.app.AppCompatDelegateImplV7.i(SourceFile:340)
    2. android.support.v7.app.AppCompatDelegateImplV7.h(SourceFile:309)
    3. android.support.v7.app.AppCompatDelegateImplV7.setContentView(SourceFile:273)
    4. android.support.v7.app.AppCompatActivity.setContentView(SourceFile:136)
    4 frames
  3. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:5133)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
    5. android.app.ActivityThread.access$600(ActivityThread.java:141)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
    7. android.os.Handler.dispatchMessage(Handler.java:99)
    8. android.os.Looper.loop(Looper.java:137)
    9. android.app.ActivityThread.main(ActivityThread.java:5103)
    9 frames
  4. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:525)
    2 frames
  5. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    3. com.android.internal.os.ZygoteInit.main(Native Method)
    3 frames
  6. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame