https://stackoverflow.com/a/47126127



Fix res/values/styles.xml and Manifest.xml like so:This solution is tested and don't forget to clean and build :

  1. Manifest.xml

change the theme of HomeActivity to :

        <activity
        android:name=".ui.home.HomeActivity"
        android:theme="@style/Base.Theme.AppCompat.Light" />
    <activity android:name=".BaseActivity"></activity>

2. res/values/styles.xml Make all your themes preceeded with Base :styles.xml will be like this :

<resources>

<!-- Base application theme. -->
<!--<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->

<style name="AppTheme" parent="Base.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="AppTheme.NoActionBar" parent="Base.Theme.AppCompat.Light">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="Base.ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="Base.ThemeOverlay.AppCompat.Light" />

Detailed explanation as requested: Theme.AppCompat.Light.DarkActionBar is a subclass of the superclass Base anyway. Ctrl+click (Android Studio) on it and you will be taken to the source:

<style name="Theme.AppCompat.Light.DarkActionBar" parent="Base.Theme.AppCompat.Light.DarkActionBar" />
  1. GithubBrowser-Master.gradle

make support_version = "27.0.0" and not support_version = "26.0.2

4.app.gradle :

compileSdkVersion 27
    buildToolsVersion '27.0.0'

and not

   compileSdkVersion 26
buildToolsVersion '26.0.2'


+ Recent posts