Skip to content
Related Articles

Related Articles

Improve Article

Different Ways to Fix “Android Studio Does not Show Layout Preview”

  • Last Updated : 23 May, 2021

Have you ever faced the problem in the android studio that it is not showing the layout preview while you are constructing a layout for your project? If yes, then this article will help you to solve this problem.  Below is the screenshot of the empty layout which is the problem that we have solved:

Methods to Solve the Problem

There are some methods that can help you solve this problem. Just try a method if that doesn’t work skip to the next method. Let’s see what are those methods:

Method 1. Force Refresh Layout

To start with this method, click on the “Select Design Surface(B)” which is located just above the eye icon. After clicking on the option, select “Force Refresh Layout” from the dropdown. The alternative shortcut key to Force Refresh Layout is the “R” key. It would force the layout to make a refresh and will refresh the screen. Below is the screenshot to demonstrate the path: 



Method 2. Invalidate caches/ Restart

Android Studio makes a lot of files like caches and does not delete them. This can cause a problem when there is a need to make new files, so clearing caches will clear the old cache and make Android Studio faster. So to Invalidate caches/ Restart, go to the file which is present in the top menu bar in Android Studio and then click on the option “Invalidate Caches/Restart…” present in the Dropdown. After that it will ask you that “Would you like to continue?”, click on Invalidate and Restart button. Below are the screenshots to show you the process:

Method 3. Disable and then Enable android apk support

Sometimes the android apk support is not working properly in Android Studio. In order to fix that we have to apply a hack. To start with it, firstly we have to go settings that are present in the file or you can also use a shortcut of Ctrl+Alt+S. After clicking on settings, a new window will appear showing you all the settings that you can change. On the left side of the settings, find an option named plugin, click on the plugin and go to Installed which will show you the installed plugins. Scroll down and check for Android APK Support and disable the option. After disabling, click on Apply button and then ok. It would disable the use of Android APK Support in Android Studio. Now go back to the same settings and Check/Enable the same option which you disabled earlier. After doing that click on Apply and then the OK button. Now, try to check the layout Preview. Below are some screenshots to show the demonstration:

 After trying all the methods, and still not able to see the Layout Preview, try to rebuild your project.

Want a more fast-paced & competitive environment to learn the fundamentals of Android?
Click here to head to a guide uniquely curated by our experts with the aim to make you industry ready in no time!
My Personal Notes arrow_drop_up
Recommended Articles
Page :