title: Android Studio 3.2.1: Layout preview not working for all projects, after loading an old project
body: <p>I needed to check out an old project which required me to download build-tools version 23.0.0 for some codes and i loaded it in my updated android studio.</p>
  
  <p>Now the layout files doesn't show any preview for me on any working project which i designed without any issues or on a new project before loading that old project 
  here are the errors i get while starting a new project:</p>
  
  <blockquote>
  <pre><code>NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.
  </code></pre>
  </blockquote>
  
  <p>And</p>
  
  <blockquote>
    <p>The following classes could not be found:<br>
     - ProjectState (Fix Build Path, Edit XML)
     - component (Fix Build Path, Edit XML)
     - config (Fix Build Path, Edit XML)
    - configuration (Fix Build Path, Edit XML)
     - configurations (Fix Build Path, Edit XML)
    - device (Fix Build Path, Edit XML)
    - entry (Fix Build Path, Edit XML)
    - expand (Fix Build Path, Edit XML)
    - file (Fix Build Path, Edit XML)
    - item (Fix Build Path, Edit XML)
    - leaf (Fix Build Path, Edit XML)
    - list (Fix Build Path, Edit XML)
    - option (Fix Build Path, Edit XML)
    - path (Fix Build Path, Edit XML)
    - project (Fix Build Path, Edit XML)
    - projectState (Fix Build Path, Edit XML)
    - projects_view (Fix Build Path, Edit XML)
    - select (Fix Build Path, Edit XML)
    - shared (Fix Build Path, Edit XML)
    - state (Fix Build Path, Edit XML)
    - system (Fix Build Path, Edit XML)
    - tree_state (Fix Build Path, Edit XML)
     Tip: Try to build the project.   Tip: Try to refresh the layout.</p>
  </blockquote>
  
  <p>And </p>
  
  <blockquote>
    <p>Render Problem: Failed to load AppCompat ActionBar with unknown error</p>
  </blockquote>
  
  <p>And</p>
  
  <blockquote>
    <p>Failed to instantiate one or more classes<br>
    The following classes could not be instantiated:
    - android.support.v7.app.WindowDecorActionBar (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.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/tz80v.jpg" rel="nofollow noreferrer">Image shows MainActivity as Unresolved class in tool:context=".MainActivity"</a></p>
  
  <p>Methods i tried to resolve this issue:</p>
  
  <blockquote>
    <ol>
    <li>Invalidate cache and restart</li>
    <li>Clean and Rebuild project</li>
    <li>Change sdk version from 28.0.0 to 27.1.1 (<em>I've been working on a project with sdk 28.0.0 earlier without any issue before loading that
    old project</em>)</li>
    <li>Reinstalled entire android studio, deleting caches except sdk</li>
    <li>Force refresh layout</li>
    <li>Set build-tools version in settings to 28.0.3</li>
    </ol>
  </blockquote>
  
  <p>build.gradle(Module: app):</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "&lt;Name Removed&gt;"
      minSdkVersion 28
      targetSdkVersion 28
      versionCode 1
      versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  buildToolsVersion '28.0.3'
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  </code></pre>
  
  <p>build.gradle(project:project-name)</p>
  
  <pre><code>buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.2.1'
  
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
  }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>merged manifest</p>
  
  <pre><code>Manifest Sources 
  
  app main manifest (this file)
   Other Manifest Files (Included in merge, but did     not contribute any elements) animated-vector-    drawable:28.0.0 manifest, appcompat-v7:28.0.0 manifest,     support:asynclayoutinflater:28.0.0 manifest,     constraint-layout:1.1.3 manifest,     support:coordinatorlayout:28.0.0 manifest,     support:cursoradapter:28.0.0 manifest,     support:customview:28.0.0 manifest,     support:documentfile:28.0.0 manifest,     support:drawerlayout:28.0.0 manifest,     support:interpolator:28.0.0 manifest,     lifecycle:livedata:1.1.1 manifest, livedata-core:1.1.1     manifest, support:loader:28.0.0 manifest,     support:localbroadcastmanager:28.0.0 manifest,     support:print:28.0.0 manifest, core:runtime:1.1.1     manifest, lifecycle:runtime:1.1.1 manifest,     support:slidingpanelayout:28.0.0 manifest, support-    compat:28.0.0 manifest, support-core-ui:28.0.0     manifest, support-core-utils:28.0.0 manifest, support-    fragment:28.0.0 manifest, support-vector-    drawable:28.0.0 manifest,     support:swiperefreshlayout:28.0.0 manifest,     support:versionedparcelable:28.0.0 manifest,     lifecycle:viewmodel:1.1.1 manifest,         support:viewpager:28.0.0 manifest 
  </code></pre>