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
Carefully check your layout-file for any incompatibilities create a new layout and add one textview in that view and check whether it will be working fine or not, sometimes our layout contains error it shouldn't showing, please try this way once and switch to "Design".click "force refresh layout"
I just realized this problem is from FloatingActionButton. Remove it and the preview works.
Mine worked by changing custom tabs to the version 28.0.0 in my build.gradle app
api 'com.android.support:appcompat-v7:28.0.0' api 'com.android.support:customtabs:28.0.0'
No need to do anything else other than just changing your Layout to LinearLayout in Activity_main.xml
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
and then
---> implementation 'com.android.support:appcompat-v7:28.0.0-alpha3' to
---> implementation 'com.android.support:appcompat-v7:27.1.1'
for android 3.1.3 I solved it by changing the dependencies
from
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
to
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'