最近,我根据新的 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>
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
此命令后跟项目名称显示错误: Theme.AppCompat.Light.DarkActionBar