Note that there are some explanatory texts on larger screens.

plurals
  1. POActionBarCompat: java.lang.IllegalStateException: You need to use a Theme.AppCompat
    text
    copied!<p>I am getting a RuntimeException on Android 2.3.5 but I <strong>am</strong> using Theme.AppCompat (res/values/themes.xml). This is the phone: <a href="http://www.gsmarena.com/samsung_galaxy_y_s5360-4117.php">http://www.gsmarena.com/samsung_galaxy_y_s5360-4117.php</a></p> <pre><code> &lt;!-- res/values/themes.xml --&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="Theme.Styled" parent="@style/Theme.AppCompat"&gt; &lt;item name="actionBarStyle"&gt;@style/QueryActionBar&lt;/item&gt; &lt;item name="android:actionBarStyle"&gt;@style/QueryActionBar&lt;/item&gt; &lt;/style&gt; &lt;style name="QueryActionBar" parent="@style/Widget.AppCompat.ActionBar"&gt; &lt;item name="background"&gt;@color/blueback&lt;/item&gt; &lt;item name="android:background"&gt;@color/blueback&lt;/item&gt; &lt;item name="backgroundSplit"&gt;@color/blueback&lt;/item&gt; &lt;item name="android:backgroundSplit"&gt;@color/blueback&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>Here is the file for values-v11.</p> <pre><code> &lt;!-- res/values-v11/themes.xml --&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="QueryTheme" parent="@android:style/Theme.Holo"&gt; &lt;!-- Any customizations for your app running on devices with Theme.Holo here --&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>Here is the error.</p> <pre><code> java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txt2lrn.www/com.txt2lrn.www.LandingActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) at android.app.ActivityThread.access$1500(ActivityThread.java:117) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:102) at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) at com.txt2lrn.www.LandingActivity.onCreate(LandingActivity.java:95) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) ... 11 more </code></pre> <p>Sorry folks, I also do have android:theme="@style/Theme.Styled" defined in AndroidManifest.xml.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload