gpt4 book ai didi

android - Material 设计主题错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:35:25 24 4
gpt4 key购买 nike

我最近决定在我的应用程序中开始使用“ Material 设计”。编译期间出现此错误:

Error:(12, 22) No resource found that matches the given name: attr 'windowNoTitle'.

下面是指向这个styles.xml

<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">

</style>

<style name="MyMaterialTheme.Base" parent="Theme.AppCompat">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

最佳答案

更改 <item name="windowNoTitle">true</item><item name="android:windowNoTitle">true</item> .

只有一些属性,大部分与appcompat-v7有关图书馆,需要 android: - 更少的版本。对于所有其他的,您应该始终使用 android 前缀。

关于android - Material 设计主题错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32027021/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com