Some layouts are shown, some just have blank, gray frame. I can\'t seem to find a correlation between XML layouts that work and those that do not, there is a mixture of use
If you unable to see 'preview' with eye icon on the right of the xml text. You have to enable preview from the view. Follow this:- View -> Tool Windows -> Preview
I've tried pretty much everything from above and nothing worked for me.
Then I've downgraded my compileSdkVersion
and targetSdkVersion
compileSdkVersion 27
targetSdkVersion 27
It worked! I've changed the versions back to 28 and it is still working.
For me, only "Force Refresh Layout" worked. Restarting, re-building, cleaning didn't work.
This is a bug in latest versions of Android Studio. The only way i have found to make it work is using forcing refresh layout .
Layout Screen Not displaying ?
Just Open Styles.xml from --- Res -> Values -> Styles.xml
Replace:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
With:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
Your Display will come immediately. This is by just adding Base.
i solved it by changing the below dependency
from
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
to
implementation 'com.android.support:appcompat-v7:27.1.1'