There is a post of the same question and it has received an answer. I suspect my case is different and it may indicate a general problem of the project configuration. windowTranslucentNavigation is for API 19. I have set targetSdkVersion inn both build.gradle and manifests. In build.gradle:
defaultConfig {
applicationId "xxx"
minSdkVersion 9
targetSdkVersion 21
// Enabling multidex support.
multiDexEnabled true
}
In manifests:
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21" />
Android Studio clearly knows about windowTranslucentNavigation. The following warning shows this:
When the project is built, the following error is generated:
Error:(7, 29) No resource found that matches the given name: attr 'windowTranslucentNavigation'.
Here is the contents of themes.xml:
<resources>
<!-- the theme applied to the application or activity -->
<style name="OverlayingActionBarTheme"
parent="@style/Theme.AppCompat">
<item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/TransparentActionBar</item>
<item name="android:windowTranslucentNavigation">true</item>
<!-- Support library compatibility -->
<item name="windowActionBarOverlay">true</item>
<item name="actionBarStyle">@style/TransparentActionBar</item>
<item name="windowTranslucentNavigation">true</item>
</style>
<!-- ActionBar styles -->
<style name="TransparentActionBar"
parent="@style/Widget.AppCompat.ActionBar">
<item name="android:background">@color/black_overlay</item>
<!-- Support library compatibility -->
<item name="background">@color/black_overlay</item>
</style>
Could anyone offer a tip on how to fix this?