0

Since Android Studio v3.6.1, I can no longer preview my xml layout files. I get "Waiting for build to finish" forever.

I found this post, which seems related, but the answers there didn't help. Android studio layout Design view not loading

As I was suspecting a style/theme related problem, I opened up at least 10 of my older apps. Unfortunately they all showed the same behaviour.

Here's a small screen shot - all my layout files look like this: enter image description here

j3App
  • 1,510
  • 1
  • 17
  • 26

2 Answers2

0

UPDATE: since mid April 2020 com.google.android.material:material:1.2.0-alpha06 is available, and with that release my problems have gone


Finally found the problem.

I have been using the newest Material lib com.google.android.material:material:1.2.0-alpha05 for a new project. This alpha state library generates a rendering error in the layout design view.

Unfortunately this error makes the layout design view part of Android Studio crash, so that all your other layouts also fail showing their design view.

The best solution would be not to use this Alpha library in its newest version, but I need it for development. The 2nd best solution is to make sure to avoid opening the related layout files in design mode.

Helpful for my finding was this: how to solve render problem Path.op() not supported?

j3App
  • 1,510
  • 1
  • 17
  • 26
0

i had a similar issue but i tried all the material design dependency libs and

implementation 'com.google.android.material:material:1.2.0-alpha02'

seems to work, resolved the issue and now i can see the xml renders on the preview and design. dont forget to clean and rebuild project after updating app.gradle

Andrew Mititi
  • 933
  • 12
  • 11
  • Yes, alpha02 was also OK for me, but I need functionality from the alpha05 release. Fortunately alpha06 was released mid April 2020, and with that all is fine again for me – j3App May 06 '20 at 13:22
  • if alpha06 is working great for you its really cool, was working on a client project for with alpha06 for the past 2 weeks and it just crashed, no rendering and studio shows an error about Views not rendeering, no class found. switched back to alpha02 and everything is great. – Andrew Mititi May 06 '20 at 13:35