2017-02-13 1 views
1

gut es mir 9 style.xml Fehler gibt, der sagtFehler beim Abrufen des übergeordneten Elements für das Element: Es wurde keine Ressource gefunden, die dem angegebenen Namen entspricht "Theme.AppCompat.Light.DarkActionBar". Visual Studio Xamarin

Fehler beim Abrufen der Eltern für die Position: Keine Ressource gefunden, das die Vornamens ‚Theme.AppCompat.Light.DarkActionBar‘ Fehler Keine Ressource gefunden, die mit dem angegebenen Namen übereinstimmt: attr 'windowNoTitle'.

, dass ich mit Xamarin Visual Studio bin mit

<?xml version="1.0" encoding="utf-8" ?> 
<resources> 

    <style name="Theme.Splash" parent="android:Theme"> 
    <item name="android:windowBackground">@drawable/splashscreen</item> 
    <item name="android:windowNoTitle">true</item> 
    <item name="android:windowActionBar">false</item> 
    </style> 

    <style name="MainTheme" parent="MainTheme.Base"> 
    </style> 
    <!-- Base theme applied no matter what API --> 
    <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> 
    <!--If you are using revision 22.1 please use just windowNoTitle. Without android:--> 
    <item name="windowNoTitle">true</item> 
    <!--We will be using the toolbar so no need to show ActionBar--> 
    <item name="windowActionBar">false</item> 
    <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette --> 
    <!-- colorPrimary is used for the default action bar background --> 
    <item name="colorPrimary">#a84849</item> 
    <!-- colorPrimaryDark is used for the status bar --> 
    <item name="colorPrimaryDark">#444</item> 
    <!-- colorAccent is used as the default value for colorControlActivated 
     which is used to tint widgets --> 
    <item name="colorAccent">#a84849</item> 
    <!-- You can also set colorControlNormal, colorControlActivated 
     colorControlHighlight and colorSwitchThumbNormal. --> 
    <item name="windowActionModeOverlay">true</item> 

    <!--<item name="datePickerDialogTheme">@style/AppCompatDialogStyle</item>--> 
    </style> 

    <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog"> 
    <item name="colorAccent">#A84849</item> 
    </style> 
</resources> 
+0

Eine kleine Beobachtung, scheinen Sie rekursiv Ihr Thema zu vererben . 'MainTheme' erbt von 'MainTheme.Base' und 'MainTheme.Base' scheint von 'MainTheme' zu stammen. –

Antwort

0

Recht auf Ihrer Lösung> Sauber. Dann baue es nochmal.

Sie können auch VS schließen und wieder öffnen, es hilft mit diesen seltsamen 'no resource found' Fehlern.

versuchen Auch das Hinzufügen 'android: windowNoTitle' statt nur 'windowNoTitle'

1

Sie nicht android Unterstützung v7 AppCompat Bibliothek verweisen kann. Es wird der Fehler wie folgt angezeigt.

enter image description here

Bitte fügen Sie die Unterstützung v7 AppCompat Bibliothek Form nuget:

enter image description here

Sie bauen Erfolg: enter image description here

Verwandte Themen

 Verwandte Themen