Android studio layout preview is stuck in waiting for build to finish even though there is no build happening. I have invalidate and restarted android studio. I have uninstalled and reinstalled. It is still having the same issue. I noticed this began after I created an xml file with constraintLayout. I have since removed it, but that didn't help.
I am getting same problem since I added material components. Are you using material components in your project? I am using com.google.android.material:material:1.2.0-alpha04 and since I added either switch or slider, the problems starting happening.. I am still investigating.
UPDATE: Ok, solved the problem for me, so I would look at what components you are using in your layout. For me it was "com.google.android.material.slider.Slider" This completely breaks layout previews in android studio, even when you open a different project.
This is a nasty bug!!!! To get layout preview working again, invalidate caches and restart, but do not go into the "infected" layout, as it will break the whole of Android Studio again.
Solution: If using these components, try and switch to 3rd party library until fix from google. Have raised bug report here: https://github.com/material-components/material-components-android/issues/992