Setting ActionBarSherlock Theme for Android app

后端 未结 7 1291
深忆病人
深忆病人 2020-12-01 10:04

READ UPDATE 2 BELOW FOR THE ANSWER

I\'m trying to use ActionBarSherlock in my app. I checked out the 4.0.0 release from the project github repo, bui

相关标签:
7条回答
  • 2020-12-01 11:04

    This is not an answer for the OP's question, but I'll just describe how I managed to get the same exception as he mentions, in the hopes it may help someone else:

        java.lang.RuntimeException: Unable to start activity
        ComponentInfo{com.Merlinia.MMessaging_Test/com.Merlinia.MMessaging_Test.TestObjectsActivity}: 
        java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
    

    In my case the solution was very simple, although it took me way too long to find it. Everything you read about this exception says "check that you've specified the theme in the manifest.xml file", so I took a quick look at my manifest.xml file, and there it was. So then I tried various other things.

    Finally, I took a closer look at my manifest.xml file. I'd made the mistake of specifying the theme for the main activity, not for the whole application!

    0 讨论(0)
提交回复
热议问题