【发布时间】:2020-08-20 19:28:21
【问题描述】:
最近我根据新的 Android 指南将目标 SDK 更新为 29,但之后我收到此错误:
D:\Android Apps\PatherPane\app\src\main\res\values\styles.xml:4:5-9:13: AAPT: error: style attribute 'attr/colorPrimary (aka com.patherpane.app :attr/colorPrimary)' 未找到。
我的样式 XML 文件是:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="SplashScreen" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">
@drawable/background_splashscreen
</item>
</style>
我该如何解决这个问题?
此命令后跟项目名称显示错误:Theme.AppCompat.Light.DarkActionBar
【问题讨论】:
标签: android xml android-studio