我試圖在我的值資源目錄中創建一個Styles.xml,但事實證明,我試圖構建它失敗的文件。我似乎無法弄清楚這個問題。是Xamarin中的某種錯誤還是我做錯了什麼? PS:我對Xamarin很新。Xamarin:無法加載Styles.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
而我得到的錯誤如下:
Resources/values/Styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
0 Warning(s)
1 Error(s)
什麼是你的android項目構建目標? –
檢查樣式是否正在更新Resources.designer.cs –