How to fix annoying Android Studio 3.1.x bug not showing preview for XML layouts?
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?
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.
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!!!