我自己的项目正在使用Android 2.1 API 7。
为了实现动作栏,我使用ActionBarSherlock库。我将sherlock库作为现有项目导入到我的 Eclipse 中。对于sherlock,目标平台是Android v3.2 API 13。
然后,我将sherlock作为库项目添加到我自己的项目中。然后,我注意到我自己的项目中的文件夹下没有R.java
文件,并且在 Eclipse 控制台中出现如下错误:gen/
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:48: error: Error: No resource found that matches the given name: attr 'android:actionBarSize'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:49: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
...
我认为可能是因为sherlock应该使用更高版本的 API,所以我尝试在sherlock项目上将目标平台设置为4.03 API 15 。但这无济于事。
任何使用sherlock的人都遇到过同样的错误??我怎么解决这个问题?
PS我自己的项目清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.frag.test"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MyActivity"
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>
</manifest>