android – 使用Maven时没有主题

我在使用ABS和Maven时遇到了问题.我通过以下方式在POM中添加了ABS支持:
<dependencies>
   <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>4.0.1.2</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>support-v4</artifactId>
        <version>r10</version>
    </dependency>       

    <dependency>
      <groupId>com.actionbarsherlock</groupId>
      <artifactId>library</artifactId>
      <version>4.2.0</version>
      <type>apklib</type>
      <exclusions>
          <exclusion>
            <groupId>com.google.android</groupId>
            <artifactId>support-v4</artifactId>
          </exclusion>
        </exclusions>
    </dependency>

    <dependency>
      <groupId>com.actionbarsherlock</groupId>
      <artifactId>library</artifactId>
      <version>4.2.0</version>
      <type>jar</type>
      <exclusions>
          <exclusion>
            <groupId>com.google.android</groupId>
            <artifactId>support-v4</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
</dependencies>

我的源代码编译很好,但我无法添加ABS主题,因为没有ABS主题可用.我尝试以下列方式添加主题:

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
            android:theme="@android:style/Theme.Sherlock" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

这会产生错误“找不到与给定名称匹配的资源”.

我应该怎么做才能添加ABS主题?

提前致谢,
的Mirco

解决方法

使用@ style / Theme.Sherlock而不是@android:style / Theme.Sherlock.

http://developer.android.com/guide/topics/ui/themes.html#ApplyATheme

这篇文章也许有帮助:

Setting ActionBarSherlock Theme for Android app

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...