Recently I updated my target SDK to 29 as per new Android guidelines but after that I received this error:
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)' not found.
And my style XML file is:
<!-- 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>
How can I fix this?
This command followed by item names is showing the error: Theme.AppCompat.Light.DarkActionBar
Make sure you have not missed appcompat implementation in build.gradle(app)
implementation ‘com.android.support:appcompat-v7:28.0.0’
or
implementation 'androidx.appcompat:appcompat:1.2.0'
if using androidx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With