EditText not renders in Layout editor

末鹿安然 提交于 2020-12-16 03:58:46

问题


My Android studio not renders EditText, I even created new project to verify it, the EditText is just blank.

I am using Android studio 4.0 and Gradle 4.0.


回答1:


In the designer window, at the top right corner, there is a symbol (Exclamation mark in a circle). if it's red, there might be some issue with the layout. You may have to enable the latest Layout Rendering Engine.

Android Studio 4.0 includes a new Layout Rendering Engine. Enable it and check if the issue still persists. if it's already enabled, you will get a the below message:

Rendering errors might be caused by the new Layout Rendering Engine. Disabling it by clicking here may fix the issue. It can later be enabled again using the Settings > Experimental dialog.




回答2:


Had the same problem, if not not similar...

I went to Project Structure and changed my dependency from com.google.android.material:material:1.2.0-alpha04 to com.google.android.material:material:1.2.0-alpha03

or you can go and change it in gradle.



来源:https://stackoverflow.com/questions/62244247/edittext-not-renders-in-layout-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!