My Android XML files can't find ActionBarSherlock themes

Posted by MalcolmMcC on Stack Overflow See other posts from Stack Overflow or by MalcolmMcC
Published on 2012-06-03T22:08:26Z Indexed on 2012/06/03 22:40 UTC
Read the original article Hit count: 270

I'm trying to develop an app with ActionBarSherlock and everything works except the theming. Specifically, I can import com.actionbarsherlock.app.*, extend SherlockActivity, but I always have this error in my manifest:

Error: No resource found that matches the given name (at 'theme' with value
'@style/Theme.Sherlock').

I know there have been plenty of questions asked about this, but they have not worked for me. I have tried

  • refreshing the workspace
  • cleaning all of my projects
  • putting the line in both the <activity> and the <application>
  • setting my targetSdkVersion and minSdkVersion to various values, in both my manifest and ABS's

and I've tried the following variations, and probably others:

  • android:theme="@style/Theme.Sherlock"
  • android:theme="@android:style/Theme.Sherlock"
  • theme="@style/Theme.Sherlock"
  • theme="@android:style/Theme.Sherlock"
  • theme="@theme/Theme.Sherlock"
  • theme="@android:theme/Theme.Sherlock"

It's worth noting that the autocomplete after I typed "@style/" was showing nothing, so I tried making my own style in styles.xml and then that showed up but still nothing from ActionBarSherlock.

Also, in styles.xml, I tried to make my own theme to extend Theme.Sherlock, and @style/Theme.Sherlock was not found there either when I tried to add it as a parent.

I tried loading the samples but got a JAR Mismatch.

My conclusion is that somehow my xml files are unable to access the ABS library, but I'm at a loss as to how to fix it. Any help hugely appreciated.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-manifest