-2

Devices shown as null in android preview xml layout mode, and no layout is shown , see attached Screen Shot .. This is not rendering problem, i tried to clean, rebuild, invalidate caches/restart but i did not worked for me , also tried to update support design libraries in gradle based on other answers on stackoverflow but it also not worked for me enter image description here

Muhammad Hassaan
  • 874
  • 6
  • 18

2 Answers2

6
 Android Studio > File > Sync Project with Gradle Files 

i am posting answer to my own question because i solved this problem with sync project with gradle files option,All other stuff like clean, rebuild project , invalidate cache/restart did not worked at all Thanks

Muhammad Hassaan
  • 874
  • 6
  • 18
0

Try the following steps, in order if one does not work try the next one

  1. Switch to text editor (button at bottom), Check if there are any errors in the layout.
  2. In the text editor too there is a preview part so you can check if that is working
  3. Build clean (Preview is not shown if build is not successful)
  4. Invalidate cache and restart
  5. Update Android studio
Khemraj Sharma
  • 57,232
  • 27
  • 203
  • 212