2014-04-05 7 views
6

Im Folgenden ist die Datei styles.xml für den Android-Support-v7-MediaRouter.Fehler in styles.xml in android-support-v7-mediarouter

<resources> 
    <style name="Widget.MediaRouter.MediaRouteButton" 
      parent="Widget.AppCompat.ActionButton"> 
     <item name="android:minWidth">56dp</item> 
     <item name="android:minHeight">48dp</item> 
     <item name="android:padding">0dp</item> 
     <item name="android:focusable">true</item> 
     <item name="android:contentDescription">@string/mr_media_route_button_content_description</item> 
     <item name="externalRouteEnabledDrawable">@drawable/mr_ic_media_route_holo_dark</item> 
    </style> 

    <style name="Widget.MediaRouter.Light.MediaRouteButton" 
      parent="Widget.AppCompat.Light.ActionButton"> 
     <item name="android:minWidth">56dp</item> 
     <item name="android:minHeight">48dp</item> 
     <item name="android:padding">0dp</item> 
     <item name="android:focusable">true</item> 
     <item name="android:contentDescription">@string/mr_media_route_button_content_description</item> 
     <item name="externalRouteEnabledDrawable">@drawable/mr_ic_media_route_holo_light</item> 
    </style> 
</resources> 

Aber ich bin immer viele keine Ressource Fehler gefunden, einige von ihnen sind:

[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/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'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:122: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionButton'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:125: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionButton'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:129: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionButton.CloseMode'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:133: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionButton.CloseMode'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:137: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionButton.Overflow'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:141: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionButton.Overflow'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:44: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabBar'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:48: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:52: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:56: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabView'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:60: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:64: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:68: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabText'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:72: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:76: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionMode.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:104: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:112: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:116: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:84: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:88: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:92: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/android-support-v7-appcompat/res/values-v14/styles_base.xml:96: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse'. 
[2014-04-05 10:03:14 - SplashActivity] /home/sahil/workspace/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'. 

ich QuickBlox chat sample to work zu bekommen versuchen. ** EDIT: ** Versionen: enter image description here enter image description here enter image description here

+0

Haben Sie die 'mediarouter' Bibliothek in Ihr Android Projekt aufgenommen? Die Bibliothek befindet sich hier, vorausgesetzt, Sie haben das Android SDK bereits installiert: '.. \ android-sdk \ extras \ android \ support \ v7 \ mediarouter' – ChuongPham

+0

@ChuongPham Ja, das habe ich über project-> properties-> source-> getan link source-> Pfad zu mediarouter .. Aber habe alle diese Fehler .. –

+0

Überprüfen Sie meine Antwort unten, um zu sehen, ob es hilft. Hinweis: Möglicherweise müssen Sie Ihren aktuellen Verweis auf die 'mediarouter'-Bibliothek löschen. – ChuongPham

Antwort

3

In Eclipse, die mediarouter Bibliothek über mehrere Android-Projekten zu teilen, gehen Sie wie folgt vor:

  1. in Eclipse wählen Datei | Importieren | Bestehende Projekte im Arbeitsbereich. Klicken Sie auf Nächste.

  2. Klicken Sie auf Durchsuchen, und durchsuchen Sie das Verzeichnis von Android-appcompat-Verzeichnis. Das Standardverzeichnis sollte wie folgt lauten: ..\android-sdk\extras\android\support\v7\mediarouter\.

  3. Klicken Sie auf Fertig stellen, um das neue Projekt hinzuzufügen.

  4. Wählen Sie die Eigenschaften Registerkarte eines Android-Projekts.

  5. In den Eigenschaften Bildschirm, wählen Sie die Android Option (auf der linken Seite), dann klicken Sie Hinzufügen, und wählen Sie die Mediarouter Bibliothek aus der Liste.

  6. Klicken Sie auf OK, um die Änderungen zu speichern.

WICHTIG: die obigen Schritte wiederholen, die appcompat und gridlayout Bibliotheken in Ihre Android-Projekte hinzuzufügen, da diese Bibliotheken durch die mediarouter Bibliothek benötigt werden. Sobald die appcompat- und gridlayout-Bibliotheken zum Arbeitsbereich hinzugefügt wurden, fügen Sie die appcompat- und gridlayout-Bibliotheken zum mediarouter-Projekt hinzu, indem Sie die obigen Schritte 4 bis 6 ausführen und den appcompat/gridlayout-Namen ersetzen, falls erforderlich.

Während auf einbetten die mediarouter Bibliothek in jedem Ihrer Android-Projekt, kopieren Sie einfach die JAR-Dateien aus dem libs des Mediarouter-Ordner in Ihrem libs Ordner des Projekts. Sie müssen auch die Bibliotheken aus den Ordnern appcompat und gridlayout in den Ordner libs Ihres Projekts kopieren.

+1

+1 :) Das half, viele Importfehler in den .java-Dateien zu beheben, aber die styles.xml zeigt immer noch dieselben Fehler. Fehler: Fehler beim Abrufen des übergeordneten Elements für Element: Keine Ressource gefunden, die den angegebenen Namen 'Theme.AppCompat .Light.DarkActionBar '. \t styles.xml \t/SplashActivity/res/values ​​\t Zeile 4 \t Android AAPT Problem –

+0

BDW Ich bette sie alle in meine Projekte lib-Ordner ein. –

+0

Haben Sie die geteilte Option anstelle der Einbettungsoption ausprobiert? Hinweis: Die freigegebene Option enthält auch Ressourcen (styles.xml), damit das Problem, auf das Sie gestoßen sind, behoben wird. – ChuongPham

7

android media router ist abhängig von appcompat v7 bibliothek. dieses Problem richtig zu beheben, fügen Sie appcompat als Abhängigkeit für Ihr „android-support-v7-Mediarouter“ Bibliotheksprojekt und dann die Mediarouter als Abhängigkeit für Ihr eigenes Projekt hinzufügen ...

mehr wie Ihr Projekt ist abhängig von android-support-v7-Mediarouter die appcompat_v7

alte Frage, späte Antwort auf abhängt, aber hoffen, dass es jemand hilft. Ich brauchte ein wenig Zeit, um es herauszufinden.

:)

Verwandte Themen