简体   繁体   中英

Android Studio 3.6.1, Layout Design View not showing

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: 在此处输入图片说明

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM