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 of binding, constraint layout, varied in complexity and length, error-free. The app is compiling and running well.
Any suggestions?
Clearing cache/restarting, cleaning, rebuilding had no effect on this
Solution: Noticed a red error icon next to layout in preview mode. It had something to do with id resources resolver @1 . I manually edited one of resource ids on a layout. This somehow fixed issue with rest of the layouts. Weird.
Edit: It seems that problem keeps reoccurring. Changing theme on the preview does however help. I would also try to change preview mode to blueprint if you are having problems.
Edit 2: I've went with Android Studio 3.2 Canary 9 and layouts are working as expected without problems. I'm guessing it had something to do with new-old bindings compiler
Edit 3: Oh god... problems are not ending. 3.2 Canary 11 uses up all given memory fast while editing layouts and then GC keeps lagging all IDE for me. Need to restart IDE every 30mins. I end up reverting to 3.1.1 and if things are not loading I force refresh layout as it was suggested in below comment.
For me, only "Force Refresh Layout" worked. Restarting, re-building, cleaning didn't work.
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With