title: Missing styles in android
body: <p>I am using android studio 2.2.3. All of my layout xmls are complaining about "Missing styles". Following is the error that I am getting when I open the design view.</p>
  
  <p> <strong>Rendering Problems Missing styles. Is the correct theme chosen for this layout?  Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.   Failed to find style 'progressBarStyle' in current theme (1568 similar errors not shown) Failed to find '?attr/textAppearanceSmall' in current theme. (65 similar errors not shown)</strong></p>
  
  <p>I have also noticed that styles.xml is unable to find "Theme.AppCompat.Light.NoActionBar". I have checked the project structure and I am able to see the com.android.support.appcompat-v7:25.2.0 in the list of dependencies. I performed invalidate caches and restart, clean/build. But I am unable to get rid of the missing styles issue. I have also tried renaming my "AppTheme" to "AppBaseTheme" and referencing this in my android manifest file. Even that did not help. I have tried doing a refresh in the design view but still cannot get rid of the missing styles error. 
  For another xml layout, I am getting the following error</p>
  
  <blockquote>
    <p>Rendering Problems Missing styles. Is the correct theme chosen for this layout?  >Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.  The following classes could not be instantiated:
    - android.support.design.widget.TabLayout (Open Class, Show Exception, Clear Cache)
     Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.  If this is an unexpected error you can also try to build the project, then manually refresh the layout.  Exception Details java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.   at android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:36)   at android.support.design.widget.TabLayout.(TabLayout.java:297)   at android.support.design.widget.TabLayout.(TabLayout.java:291)   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)   at android.view.LayoutInflater.inflate(LayoutInflater.java:518)   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)</p>
  </blockquote>
  
  <p>Can some one please point me in the right direction? Thanks.</p>
  
  <p>Following is my manifest.
      </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  
  &lt;application
      android:allowBackup="true"
      android:name=".ExampleApplication"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
  
      &lt;activity
          android:name=".activity.SplashActivity"
          android:screenOrientation="portrait"
          android:theme="@style/SplashTheme"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN"/&gt;
              &lt;category android:name="android.intent.category.LAUNCHER"/&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name=".activity.MainActivity"
          android:screenOrientation="portrait"
          android:windowSoftInputMode="adjustResize"/&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>Following is my build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
  compileSdkVersion 25
  buildToolsVersion "25.0.1"
  defaultConfig {
      applicationId "com.example.package"
      minSdkVersion 18
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      jackOptions {
          enabled true
      }
  
      dexOptions {
          preDexLibraries true
          javaMaxHeapSize "4g"
      }
  
      lintOptions {
          abortOnError false
      }
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  
  testOptions {
      unitTests.returnDefaultValues = true
  }
  
  compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
  }
  
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
  compile 'com.android.support:recyclerview-v7:25.2.0'
  compile 'com.android.support:cardview-v7:25.2.0'
  compile 'com.android.support:design:25.2.0'
  compile 'com.android.support:appcompat-v7:25.2.0'
  compile group: 'joda-time', name: 'joda-time', version: '2.9.6'
  compile group: 'com.google.guava', name: 'guava', version: '20.0'
  compile 'com.squareup.retrofit2:retrofit:2.1.0'
  compile 'com.squareup.retrofit2:converter-gson:2.0.2'
  compile 'com.github.zagum:Android-SwitchIcon:1.3.2'
  compile 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
  compile 'com.prolificinteractive:material-calendarview:1.4.2'
  
  compile 'com.jakewharton:butterknife:8.5.1'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
  
  compile 'com.google.dagger:dagger:2.7'
  annotationProcessor 'com.google.dagger:dagger-compiler:2.7'
  
  
  testCompile 'junit:junit:4.12'
  testCompile "org.robolectric:robolectric:3.0"
  testCompile "org.robolectric:shadows-support-v4:3.0"
  testCompile 'org.mockito:mockito-core:1.10.19'
  
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
  })
  androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
  compile 'com.android.support.constraint:constraint-layout:1.0.0'
  }
  </code></pre>
  
  <p>Following is my styles.xml.</p>
  
  <pre><code>&lt;resources&gt;
  
  &lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="drawerArrowStyle"&gt;@style/DrawerArrowStyle&lt;/item&gt;
      &lt;item name="android:textViewStyle"&gt;@style/RobotoTextViewStyle&lt;/item&gt;
      &lt;item name="android:editTextStyle"&gt;@style/RobotoEditTextStyle&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"&gt;
      &lt;item name="android:windowBackground"&gt;@drawable/splash&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="RobotoTextViewStyle" parent="android:Widget.TextView"&gt;
      &lt;item name="android:fontFamily"&gt;sans-serif&lt;/item&gt;
      &lt;item name="android:textSize"&gt;@dimen/body&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@color/colorBlack&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="RobotoEditTextStyle" parent="android:Widget.EditText"&gt;
      &lt;item name="android:fontFamily"&gt;sans-serif&lt;/item&gt;
      &lt;item name="android:textSize"&gt;@dimen/body&lt;/item&gt;
      &lt;item name="android:padding"&gt;@dimen/edittext_padding&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"&gt;
      &lt;item name="spinBars"&gt;true&lt;/item&gt;
      &lt;item name="color"&gt;@android:color/white&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/&gt;
  
  &lt;style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/&gt;
  
  &lt;style name="TextInputLayoutStyle" parent="TextAppearance.AppCompat.Small"&gt;
      &lt;item name="android:textColor"&gt;@color/color_android_green&lt;/item&gt;
      &lt;item name="android:textStyle"&gt;bold|italic&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="TextInputLayoutStyleError" parent="TextAppearance.AppCompat.Small"&gt;
      &lt;item name="android:textColor"&gt;@color/colorRed&lt;/item&gt;
      &lt;item name="android:textStyle"&gt;bold|italic&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="CustomTextStyle" parent="@android:style/TextAppearance.Widget.TabWidget"&gt;
      &lt;item name="android:textSize"&gt;20sp&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="CustomSwitch" parent="Theme.AppCompat.Light"&gt;
      &lt;!-- active thumb &amp; track color (30% transparency) --&gt;
      &lt;item name="colorControlActivated"&gt;@color/colorAccent&lt;/item&gt;
  
      &lt;!-- inactive thumb color --&gt;
      &lt;item name="colorSwitchThumbNormal"&gt;@color/colorGrayDarker&lt;/item&gt;
  
      &lt;!-- inactive track color (30% transparency) --&gt;
      &lt;item name="android:colorForeground"&gt;@color/colorGray&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="CustomTabLayout" parent="Base.Widget.Design.TabLayout"&gt;
      &lt;item name="tabIndicatorColor"&gt;@color/colorGold&lt;/item&gt;
      &lt;item name="tabSelectedTextColor"&gt;@color/colorGold&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="StyledScrollerTextAppearance"&gt;
      &lt;item name="android:textColor"&gt;@color/colorWhite&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p></p>
  
  <p>Tablayout xml snippet</p>
  
  <pre><code>    &lt;android.support.design.widget.TabLayout
      android:id="@+id/callScheduleType"
      style="@style/CustomTabLayout"
      android:layout_width="0dp"
      android:layout_height="40dp"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/guidelineNavHeight"&gt;
  
      &lt;android.support.design.widget.TabItem
          android:id="@+id/personal"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="personal"/&gt;
  
      &lt;android.support.design.widget.TabItem
          android:id="@+id/community"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="community"/&gt;
  &lt;/android.support.design.widget.TabLayout&gt;
  </code></pre>