java - 使用ActionBarSherlock 4.1.0时资源文件出错

标签 java android actionbarsherlock

我在 Eclipse 中成功编译了 ActionBarSherlock。

但是当我在新项目中使用它时出现 75 错误:

abs4.1.0\library\res\values-v14\abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.
abs4.1.0\library\res\values-v14\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
abs4.1.0\library\res\values-v14\abs__styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar'.
abs4.1.0\library\res\values-v14\abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'.
abs4.1.0\library\res\values-v14\abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'.
abs4.1.0\library\res\values-v14\abs__styles.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabView'.
abs4.1.0\library\res\values-v14\abs__styles.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView'.
abs4.1.0\library\res\values-v14\abs__styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView.Inverse'.
abs4.1.0\library\res\values\abs__styles.xml:89: error: Error: No resource found that matches the given name: attr 'android:dividerPadding'.
abs4.1.0\library\res\values\abs__styles.xml:88: error: Error: No resource found that matches the given name: attr 'android:showDividers'.    

MainActivity.java:

package com.stackoverflow.users.comfreek.testproject

import android.os.Bundle;
import com.actionbarsherlock.app.SherlockActivity;

public class MainActivity extends SherlockActivity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  }
}

我已经将 Activity 主题设置为@style/Theme.Sherlock

最佳答案

确保您已将 API 级别设置为 13。

请参阅此类似问题的答案 https://stackoverflow.com/a/8591853/808940

关于java - 使用ActionBarSherlock 4.1.0时资源文件出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11170844/

相关文章:

java - JVM是如何调用的?

android - 如何在顶部工具栏的购物车图标上添加商品编号?安卓

android - 蓝牙 startDiscovery() 不适用于 Android 10

Android ActionBar 高度问题

android - 在 ActionbarSherlock 中使用 "SearchView"

android - 适用于 Android 的 Mono 的 ActionBarSherlock 的 jar-Binding

java - 参数 redirectattributes 是模型或映射类型,但不能从实际模型分配

java - 编译 fatal error : invalid flag: --release for jdk 11 on Jenkins?

java - 如何在Java中使用UDP发送文件

java - 如何在 Android 中显示以毫秒为单位的日期和时间?