How to fix annoying Android Studio 3.1.x bug not showing preview for XML layouts?

Prasannajeet Pani
Android Nuggets
Published in
2 min readAug 26, 2018

Ever had to face the issue where you are trying to construct a layout in Android Studio 3.1.x and you saw something like this on your layout preview?

Android Studio layout preview shows no actual previews

Well, I hear you. I had to look around the Internet a lot and finally I found a StackOverflow solution that helped me.

All you had to do is go to styles.xml file and replace your parent theme from Theme.AppCompat.Light.DarkActionBar to Base.Theme.AppCompat.Light.DarkActionBar

And just like that, I got my layout preview to work.

Fixed!!!!

Its mighty annoying that Google hasn’t fixed this little bit of a kink on Android Studio in an update so far. But at least now we have a fix.

Truth can only be found in one place: the code. — Robert. C. Martin.

Like the article? Well slap on those claps!!!

Cheers!!!

--

--

Prasannajeet Pani
Android Nuggets

Android Developer to fund my Photography to feed my soul. My alter ego is a stand-up comedian. IG: http://instagram.com/prasan.photos