将Xamarin升级到最新版本后无法编译styles.xml

时间:2016-03-14 14:44:10

标签: android xamarin

最近我将Xamarin升级到最新版本,我的项目停止编译。错误是:

Styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.NoActionBar'.
Styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorAccent'.
Styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimary'.
Styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimaryDark'.
Styles.xml(2): error APT0000: No resource found that matches the given name: attr 'drawerArrowStyle'.

错误指向的XML片段如下所示:

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

  <style name="MyTheme" parent="@style/Theme.AppCompat.Light.NoActionBar" >
    <item name="colorPrimary">@color/primary</item>
    <item name="drawerArrowStyle">@style/MyDrawerArrowStyle</item>
    <item name="colorPrimaryDark">@color/primary_dark</item>
    <item name="colorAccent">@color/accent</item>
  </style>

可能是什么原因?我该如何解决?

0 个答案:

没有答案