Open voydz opened 11 years ago
have you at least tried to use the @style/Theme.Sherlock.Light.DarkActionBar
directly, does that work?
this seem to work, since this is the case for splash activity which is launched before the login activity, and i got no crashes for it
This happens to me as well. I changed my styles.xml
style name to Theme.Sherlock.Light
as it was originally Android:Theme.Light
. Having the latter caused crashes, and seems to be affected devices with 2.3.6 or below.
Also happens on Galaxy Tab 7.0 Plus (GT-P6200).
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.MainActivity}: 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:1815)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
at android.app.ActivityThread.access$500(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
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.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:261)
at com.example.MainActivity.onCreate(MainActivity.java:74)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
... 11 more
I experienced the same issue on the XOOM (wifi_hubble) and GT-P7510
I also had this problem but I solved it. In my case it was generated because I have two themes.xml files with the style for the actionbar one under values and another under values-v11 and I was trying to use Theme.Sherlock.Light for versions prior honeycomb and Theme.Holo.Light for the rest of them. Once I deleted the v11 themes.xml and just left the one that use Theme.Sherlock.Light that error dissapeared.
hello , i m using ecllipse 10 with the latest updates and getting error in "Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' " . Even my 2 month old successfully running projects are now showing me error
On very few Devices (i.e. a GT-P6800) I get a:
My LoginActivity looks like this (the 36th line is the #setContentView):
Here is my Manifest:
And finally my style.xml:
Notice that the SplashActivity works just fine. When it starts the intent for LoginActivity it crashes. Does the problem come from the inheritance? Anyway I need a custom style, so I am not able to declare
@style/Theme.Sherlock.Light.DarkActionBar
directly.