'preview of my layout in xml file not showing?

i have created 4 activities they all were work well but suddenly the preview of design in XML file is not showing I have tried to reopen my android studio also that specific XML. but the problem is still here. XML code is showing but only the preview of design is not showing here the ss of screen. please check and help me to solve this out.

split_mode of Xml file

design_mode of XML file.



Solution 1:[1]

please try the following steps:

  1. clean project
  2. delete .idea and .gradle file
  3. remove app/build folder
  4. now do invalid cache and restart

if still your problem is not solved then try to restart your computer

Solution 2:[2]

you just need to do invalidate Caches and restart, I have provided an image for you to know what to do exactly. in android studio, go to the top left corner and select file and click on Invalidate Caches/restart and that will restart your android studio. than try to open your xml layout.

Image

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dharmik nanavati
Solution 2 kingston