2016-09-06 3 views
0

Ich versuche, eine Navigationsleiste in Android zu machen, aber ich bekomme diese Fehlermeldung:Navigationsleiste in android Xamarin Schaffung

1.No resource found that matches the given name: attr 'colorPrimary'. 
2.No resource found that matches the given name: attr 'colorPrimaryDark'. 
3.No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar' 

und hier ist mein Code

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="Theme.DesignDemo" parent="Base.Theme.DesignDemo"></style> 
    <style name="Base.Theme.DesignDemo" parent="Theme.AppCompat.Light.NoActionBar"> 
    <item name="colorPrimary">#2196F3</item> 
    <item name="colorPrimaryDark">#1976D2</item> 
    </style> 
</resources> 
+0

es scheint, Sie haben keine Unterstützung Bibliotheken zu Ihrem Projekt –

+0

hinzufügen, aber ich habe das! –

Antwort

0

hinzufügen Xamarin Unterstützung v4 und v7 AppCompat NuGet Pakete zu Ihrem Projekt.

+0

Ich mache das erste –

0

Try this:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="Theme.DesignDemo" parent="Base.Theme.DesignDemo"></style> 
    <style name="Base.Theme.DesignDemo" parent="@android:style/Theme.AppCompat.Light.NoActionBar"> 
    <item name="android:colorPrimary">#2196F3</item> 
    <item name="android:colorPrimaryDark">#1976D2</item> 
    </style> 
</resources> 
+0

mit diesem Code 2 des Fehlers gegangen –

+0

aber. Keine Ressource gefunden, die den angegebenen Namen 'Theme.AppCompat.Light.NoActionBar' noch resistent –

+0

fügen Sie diese [Komponente] (https: //components.xamarin. com/view/xamandroidsupportv7appcompat) –

Verwandte Themen