使用Xamarin Forms,我似乎无法构建项目。我可以建立一个普通的Xamarin android项目,但是使用Forms时它总是失败
我的样式定义为:
值中的style.xml
<resources>
<style name="MyTheme" parent="MyTheme.Base">
</style>
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>
<item name="android:windowBackground">@color/window_background</item>
<item name="windowActionModeOverlay">true</item>
</style>
</resources>
值21中的style.xml
<resources>
<style name="MyTheme" parent="MyTheme.Base">
</style>
</resources>
清单中的以下内容
<application android:label="AppName" android:icon="@drawable/icon" android:theme="@style/MyTheme"></application>
最佳答案
我相信您在文件名中有错字。它应该是styles.xml
与style.xml
。但是,您仍将使用@style/MyTheme
。