Android Studio 3.2.1: Layout preview not working for all projects, after loading an old project












1















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.



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:




NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.



And




The following classes could not be found:

- 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.




And




Render Problem: Failed to load AppCompat ActionBar with unknown error




And




Failed to instantiate one or more classes

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.




Image shows MainActivity as Unresolved class in tool:context=".MainActivity"



Methods i tried to resolve this issue:





  1. Invalidate cache and restart

  2. Clean and Rebuild project

  3. Change sdk version from 28.0.0 to 27.1.1 (I've been working on a project with sdk 28.0.0 earlier without any issue before loading that
    old project
    )

  4. Reinstalled entire android studio, deleting caches except sdk

  5. Force refresh layout

  6. Set build-tools version in settings to 28.0.3




build.gradle(Module: app):



apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "<Name Removed>"
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'
}


build.gradle(project:project-name)



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
}


merged manifest



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









share|improve this question

























  • have you synchronized your project?

    – Farhana
    Nov 14 '18 at 4:17











  • Yes sir, i have

    – AruN
    Nov 14 '18 at 4:49











  • in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

    – Farhana
    Nov 14 '18 at 4:52











  • Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

    – AruN
    Nov 14 '18 at 4:56













  • remove tools in xml and then check.

    – Farhana
    Nov 14 '18 at 4:57
















1















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.



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:




NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.



And




The following classes could not be found:

- 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.




And




Render Problem: Failed to load AppCompat ActionBar with unknown error




And




Failed to instantiate one or more classes

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.




Image shows MainActivity as Unresolved class in tool:context=".MainActivity"



Methods i tried to resolve this issue:





  1. Invalidate cache and restart

  2. Clean and Rebuild project

  3. Change sdk version from 28.0.0 to 27.1.1 (I've been working on a project with sdk 28.0.0 earlier without any issue before loading that
    old project
    )

  4. Reinstalled entire android studio, deleting caches except sdk

  5. Force refresh layout

  6. Set build-tools version in settings to 28.0.3




build.gradle(Module: app):



apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "<Name Removed>"
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'
}


build.gradle(project:project-name)



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
}


merged manifest



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









share|improve this question

























  • have you synchronized your project?

    – Farhana
    Nov 14 '18 at 4:17











  • Yes sir, i have

    – AruN
    Nov 14 '18 at 4:49











  • in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

    – Farhana
    Nov 14 '18 at 4:52











  • Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

    – AruN
    Nov 14 '18 at 4:56













  • remove tools in xml and then check.

    – Farhana
    Nov 14 '18 at 4:57














1












1








1


2






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.



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:




NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.



And




The following classes could not be found:

- 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.




And




Render Problem: Failed to load AppCompat ActionBar with unknown error




And




Failed to instantiate one or more classes

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.




Image shows MainActivity as Unresolved class in tool:context=".MainActivity"



Methods i tried to resolve this issue:





  1. Invalidate cache and restart

  2. Clean and Rebuild project

  3. Change sdk version from 28.0.0 to 27.1.1 (I've been working on a project with sdk 28.0.0 earlier without any issue before loading that
    old project
    )

  4. Reinstalled entire android studio, deleting caches except sdk

  5. Force refresh layout

  6. Set build-tools version in settings to 28.0.3




build.gradle(Module: app):



apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "<Name Removed>"
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'
}


build.gradle(project:project-name)



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
}


merged manifest



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









share|improve this question
















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.



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:




NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.



And




The following classes could not be found:

- 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.




And




Render Problem: Failed to load AppCompat ActionBar with unknown error




And




Failed to instantiate one or more classes

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.




Image shows MainActivity as Unresolved class in tool:context=".MainActivity"



Methods i tried to resolve this issue:





  1. Invalidate cache and restart

  2. Clean and Rebuild project

  3. Change sdk version from 28.0.0 to 27.1.1 (I've been working on a project with sdk 28.0.0 earlier without any issue before loading that
    old project
    )

  4. Reinstalled entire android studio, deleting caches except sdk

  5. Force refresh layout

  6. Set build-tools version in settings to 28.0.3




build.gradle(Module: app):



apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "<Name Removed>"
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'
}


build.gradle(project:project-name)



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
}


merged manifest



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






android xml android-studio layout preview






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 2:57







AruN

















asked Nov 14 '18 at 2:28









AruNAruN

216




216













  • have you synchronized your project?

    – Farhana
    Nov 14 '18 at 4:17











  • Yes sir, i have

    – AruN
    Nov 14 '18 at 4:49











  • in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

    – Farhana
    Nov 14 '18 at 4:52











  • Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

    – AruN
    Nov 14 '18 at 4:56













  • remove tools in xml and then check.

    – Farhana
    Nov 14 '18 at 4:57



















  • have you synchronized your project?

    – Farhana
    Nov 14 '18 at 4:17











  • Yes sir, i have

    – AruN
    Nov 14 '18 at 4:49











  • in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

    – Farhana
    Nov 14 '18 at 4:52











  • Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

    – AruN
    Nov 14 '18 at 4:56













  • remove tools in xml and then check.

    – Farhana
    Nov 14 '18 at 4:57

















have you synchronized your project?

– Farhana
Nov 14 '18 at 4:17





have you synchronized your project?

– Farhana
Nov 14 '18 at 4:17













Yes sir, i have

– AruN
Nov 14 '18 at 4:49





Yes sir, i have

– AruN
Nov 14 '18 at 4:49













in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

– Farhana
Nov 14 '18 at 4:52





in your XML you forgot to set width or height of any view that's why you are getting this message and post your xml too.

– Farhana
Nov 14 '18 at 4:52













Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

– AruN
Nov 14 '18 at 4:56







Actually nope i haven't missed any attributes, the project s i've already made which work like charm doesn't load layout preview now, but works fine when app runs on phone or emulator

– AruN
Nov 14 '18 at 4:56















remove tools in xml and then check.

– Farhana
Nov 14 '18 at 4:57





remove tools in xml and then check.

– Farhana
Nov 14 '18 at 4:57












2 Answers
2






active

oldest

votes


















1














I encountered something similar with Android Studio 3.2.1. The project built successfully, no issues, but nothing is displayed on my layout preview view. Tried clean/rebuild, invalidate cache/restart, close/open project, force refresh layout, sync project with gradle files. The only thing that helped me and restored my layout Design preview was to delete caches folder in .AndroidStudio3.2system.






share|improve this answer

































    -1














    Ok so i found the solution. For anyone who face this issue,



    Go to sdk folder, open build tools and delete them all..
    Open Android studio and let them redownload.






    share|improve this answer

























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292346%2fandroid-studio-3-2-1-layout-preview-not-working-for-all-projects-after-loading%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      I encountered something similar with Android Studio 3.2.1. The project built successfully, no issues, but nothing is displayed on my layout preview view. Tried clean/rebuild, invalidate cache/restart, close/open project, force refresh layout, sync project with gradle files. The only thing that helped me and restored my layout Design preview was to delete caches folder in .AndroidStudio3.2system.






      share|improve this answer






























        1














        I encountered something similar with Android Studio 3.2.1. The project built successfully, no issues, but nothing is displayed on my layout preview view. Tried clean/rebuild, invalidate cache/restart, close/open project, force refresh layout, sync project with gradle files. The only thing that helped me and restored my layout Design preview was to delete caches folder in .AndroidStudio3.2system.






        share|improve this answer




























          1












          1








          1







          I encountered something similar with Android Studio 3.2.1. The project built successfully, no issues, but nothing is displayed on my layout preview view. Tried clean/rebuild, invalidate cache/restart, close/open project, force refresh layout, sync project with gradle files. The only thing that helped me and restored my layout Design preview was to delete caches folder in .AndroidStudio3.2system.






          share|improve this answer















          I encountered something similar with Android Studio 3.2.1. The project built successfully, no issues, but nothing is displayed on my layout preview view. Tried clean/rebuild, invalidate cache/restart, close/open project, force refresh layout, sync project with gradle files. The only thing that helped me and restored my layout Design preview was to delete caches folder in .AndroidStudio3.2system.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 1 '18 at 8:59

























          answered Nov 23 '18 at 4:56









          zeenosaurzeenosaur

          484




          484

























              -1














              Ok so i found the solution. For anyone who face this issue,



              Go to sdk folder, open build tools and delete them all..
              Open Android studio and let them redownload.






              share|improve this answer






























                -1














                Ok so i found the solution. For anyone who face this issue,



                Go to sdk folder, open build tools and delete them all..
                Open Android studio and let them redownload.






                share|improve this answer




























                  -1












                  -1








                  -1







                  Ok so i found the solution. For anyone who face this issue,



                  Go to sdk folder, open build tools and delete them all..
                  Open Android studio and let them redownload.






                  share|improve this answer















                  Ok so i found the solution. For anyone who face this issue,



                  Go to sdk folder, open build tools and delete them all..
                  Open Android studio and let them redownload.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 14 '18 at 8:34

























                  answered Nov 14 '18 at 5:01









                  AruNAruN

                  216




                  216






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292346%2fandroid-studio-3-2-1-layout-preview-not-working-for-all-projects-after-loading%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      這個網誌中的熱門文章

                      Hercules Kyvelos

                      Tangent Lines Diagram Along Smooth Curve

                      Yusuf al-Mu'taman ibn Hud