Android – error retrieving item’s parent: cannot find resource matching the given name ‘theme. Appcompat. Light. Darkactionbar’. Xamarin Visual Studio
•
Android
Well, it gave me 9 style.xml errors, the content is
Just like I use visual studio in xamarin
<?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>
resolvent:
You may not have referenced the Android support V7 appcompat library. It will display the following error
Please add a table nuget that supports V7 appcompat Library:
You will successfully establish:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码