我正在尝试在我的应用程序中使用 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'.

据我所知,由于 ABS 中的一些 XML,SlidingMenu 抛出错误,这意味着 R 不会生成,我不能使用 SlidingMenu。

最佳答案

转到属性。

单击最近的目标平台(也有用于 mapActivity 的谷歌 map )。在这张图片中,它的 4.2 Google APIs

10-08 03:08