Since today morning I started encountering this weird issue. Android Studio layout preview panel and Design view was not displaying some of my layouts which were perfectly fine until I updated Android Studio from 3.0.1 to 3.1.
I tried following which didn't helped :
- Updated buildTools from 27.0.2 to 27.0.3
- Updated support library from 27.0.2 to 27.1.1
- Updated constraint layout library from 1.1.0-beta5 to 1.1.0-beta6
- Synced Project with Gradle files multiple times
- Clean and Rebuilt project multiple times
- Invalidated and Restarted Android Studio
- Closed project from File menu and reopened it (I suspected it was due to some mismanagement of layout preview cache which was not getting cleared)
- Finally restarted my PC
Android Studio details :
Android Studio 3.1 Build #AI-173.4670197, built on March 22, 2018 JRE: 1.8.0_152-release-1024-b02 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 8.1 6.3