引用ABS时Android SlidingMenu错误

时间:2012-12-02 21:05:13

标签: android actionbarsherlock

我正在尝试在我的应用中使用SlidingMenu(https://github.com/jfeinstein10/SlidingMenu/)。我的第一个问题是该项目使用的是MATCH_PARENT,它不能为我编译。 minSDK设置为5,targetSDK为17.我尝试将min更改为8,这是在引入MATCH_PARENT时,没有运气。

用FILL_PARENT替换所有MATCH_PARENT后,它们都编译为-1,项目似乎没问题。然后我按照开发人员在github上的说明继续使用ABS。每当我引用ABS时,我会收到许多错误,例如:

[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__styles.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Small'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v11\abs__themes.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v11\abs__themes.xml:6: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v11\abs__themes.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v11\abs__themes.xml:10: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:14: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:22: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:26: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:196: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:197: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:198: error: Error: No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:30: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Dialog'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:222: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:223: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values\abs__themes.xml:224: error: Error: No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
[2012-12-02 13:53:39 - LibrarySlidingMenu] C:\Users\RynoJvR\Dropbox\Android\LibraryActionBarSerlock\res\values-v14\abs__themes.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.Dialog'.

据我所知,SlidingMenu因为ABS中的某些XML而抛出错误,这意味着R不会生成,我也不能使用SlidingMenu。

1 个答案:

答案 0 :(得分:3)

转到属性。 enter image description here

点击最新的目标平台(也包含mapActivity的谷歌地图)。在此图像中,它是4.2 Google Apis