Verwenden AppCompat-Bibliothek für die ActionBar Unterstützung

Brauche ich zur Umsetzung der actionbar in Android 2.x ich habe versucht, mit diese post und Einrichtung der Bibliothek unterstützt wie bereits in dieseoffiziellen Artikel.

Hier sind die Schritte, die ich verfolgt habe für die Umsetzung der ActionBar mit der appcompat-support-Bibliothek:

Zuerst erstelle ich das Projekt mit der folgenden Konfiguration (ich weiß nicht, erstellen Sie ein Symbol und eine Standard-Aktivität):

Minimum Required SDK: API 10: Android 2.3.3 (Gingerbread)

Target SDK: API 19: Android 4.4

Kompilieren mit: API 10: Android 2.3.3 (Gingerbread)

Thema: Keine

Nach, in der Projekt Eigenschaften => Android => Bibliothek füge ich die android-support-v7-appcompat Bibliothek-Projekt.

Danach bekomme ich 128 Fehler, wie dies in dem Projekt, in dem ich die appcompat Bibliothek. Alle von Ihnen sind im Zusammenhang mit der Holo Thema:

[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.  

Bitte beachten Sie, dass der Fehler tritt nur mit der Werte-v14 und Werte-v11 Ordner in der appcompat Bibliothek-Projekt. Hier sind 2 Beispiele für die Fehler, die ich bekomme:

[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.  
[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\styles_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ProgressBar.Horizontal'.  

Außerdem gibt es einige Fehler, die nicht im Zusammenhang mit der Holo Thema:

[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:225: error: Error: No resource found that matches the given name: attr 'android:dividerPadding'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:224: error: Error: No resource found that matches the given name: attr 'android:showDividers'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\themes_base.xml:33: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\themes_base.xml:44: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:41: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:67: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.  
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:94: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.  

Hat jemand das gleiche problem gehabt?

InformationsquelleAutor Jorge E. Hernández | 2013-12-06

Schreibe einen Kommentar