Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

ABS causes an IllegalStateException on some devices #1053

Open
Don-Doudou opened this issue Oct 10, 2013 · 7 comments
Open

ABS causes an IllegalStateException on some devices #1053

Don-Doudou opened this issue Oct 10, 2013 · 7 comments

Comments

@Don-Doudou
Copy link

In some devices that run Android 2.1+ i have this exception:

java.lang.RuntimeException: Unable to start activity
java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
at android.app.ActivityThread.access$1500(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
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:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:976)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:902)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:836)
at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:229)
at com.don.app.constitutionduniger.MainActivity.onCreate(MainActivity.java:31)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
... 11 more

@hameno
Copy link
Contributor

hameno commented Oct 23, 2013

Well, you did read the error message, right? :) The parent style seems to be wrong (maybe in one of the configurations?)

@alexliubj
Copy link

It always crash when I open the music balance settings page.

2013/10/23 Philip Schiffer [email protected]

Well, you did read the error message, right? :) The parent style seems to
be wrong (maybe in one of the configurations?)


Reply to this email directly or view it on GitHubhttps://github.com//issues/1053#issuecomment-26881960
.

Alex.Liu

@thuannv
Copy link

thuannv commented Nov 4, 2013

When you use actionbarsherlock, in your AndroidManifest.xml you should be specify theme which is inherit from sherlock theme.
ex:

@voydz
Copy link

voydz commented Nov 6, 2013

Reference to #966 ?

@antoni-alvarez
Copy link

Im using "Theme.Sherlock" style, and I have this exact error in my Developer Console. This is my Manifest:

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.Sherlock" >

@thuannv
Copy link

thuannv commented Dec 16, 2013

You should specify theme inherits from Theme.Sherlock in your activity instead of your application, as my AndroidManifest.xml below:

    <activity
        android:name="com.vng.labansecurity.MainActivity"
        android:configChanges="screenSize"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:theme="@style/Theme.Sherlock"
        android:uiOptions="splitActionBarWhenNarrow" >
        <meta-data
            android:name="android.support.UI_OPTIONS"
            android:value="splitActionBarWhenNarrow" />

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

@sogrEEN
Copy link

sogrEEN commented Dec 16, 2013

2013/12/16 Thuan Nguyen [email protected]

You should specify theme inherits from Theme.Sherlock in your activity
instead of your application, as my AndroidManifest.xml below:

<activity
    android:name="com.vng.labansecurity.MainActivity"
    android:configChanges="screenSize"
    android:label="@string/app_name"
    android:launchMode="singleTask"
    android:theme="@style/Theme.Sherlock"
    android:uiOptions="splitActionBarWhenNarrow" >
    <meta-data
        android:name="android.support.UI_OPTIONS"
        android:value="splitActionBarWhenNarrow" />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

¡ª
Reply to this email directly or view it on GitHubhttps://github.com//issues/1053#issuecomment-30628756
.

Oh£¡£¡I Know......thank you for your help£¡£¡

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants