1

我已将 ActionBarSherlock 添加到 IntelliJ IDEA 中的 Android 项目中,并且看到以下构建错误

IDE 中的所有内容都表明我正在针对平台 API 11 构建,我希望它会包含这些样式,尽管在 API 11 中我看不到它们。

我错过了什么?ABS 是否仅适用于更高版本的 Android 平台版本?

Information:Compilation completed with 6 errors and 0 warnings
Information:6 errors
Information:0 warnings
C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml
    Error:Error:line (4)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabBar'.
    Error:Error:line (5)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabView'.
    Error:Error:line (6)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabText'.
    Error:Error:line (8)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar'.
    Error:Error:line (9)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:9: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView'.
    Error:Error:line (10)C:\Users\Ollie\Documents\Dropbox\Tech\Blah\ActionBarSherlock\res\values-v13\abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText'.

相关来源:

<?xml version="1.0" encoding="utf-8"?>

<resources>
    <style name="Widget.Sherlock.ActionBar.TabBar" parent="android:Widget.Holo.ActionBar.TabBar"></style>
    <style name="Widget.Sherlock.ActionBar.TabView" parent="android:Widget.Holo.ActionBar.TabView"></style>
    <style name="Widget.Sherlock.ActionBar.TabText" parent="android:Widget.Holo.ActionBar.TabText"></style>

<style name="Widget.Sherlock.Light.ActionBar.TabBar" parent="android:Widget.Holo.Light.ActionBar.TabBar"></style>
<style name="Widget.Sherlock.Light.ActionBar.TabView" parent="android:Widget.Holo.Light.ActionBar.TabView"></style>
<style name="Widget.Sherlock.Light.ActionBar.TabText" parent="android:Widget.Holo.Light.ActionBar.TabText"></style>

4

1 回答 1

3

在清单中有一个目标版本 13。使用它。在库的清单下方。

    <uses-sdk
        android:minSdkVersion="4"
        android:targetSdkVersion="13" />

</manifest>
于 2011-12-07T18:37:16.523 回答