Solution 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.
Solution 2 :
I am having the same problem right now, well what I have noticed is that this problem is generated when you are adding a new qualifier; for example smallest screen width (let’s say 720dp) and maybe another qualifier like orientation (let’s say landscape).
Well here what I noticed:
first the view references like:
app: layout_constraintBottom_toBottomOf = "" app: layout_constraintEnd_toEndOf = "" app: layout_constraintDimensionRatio = "1: 1" app: layout_constraintStart_toEndOf = "" app: layout_constraintTop_toTopOf = ""
even being in landscape they still have the references as if they were of portrait orientation. for example in a portrait screen mode, if you had two vertical guidelines (let’s call them gui1 and gui2) and between these two you had some imageviews (let’s call them iv, iv2, and iv3 and let’s focus on iv2 and iv3) for example
app: layout_constraintTop_toBottomOf (hereinafter totobo) app: layout_constraintStart_toStartOf = "@ id / gui1" (stst) app: layout_constraintEnd_toEndOf = "@ id / gui2" (enen)
when the qualifier passes to landscape it does not change to what would correspond with the new orientation which would be something like this:
app: layout_constraintEnd_toStartOf = "@ + id / iv2" (enst) app: layout_constraintTop_toTopOf = "@ id / gui1" (tototo) app: layout_constraintBottom_toBottomOf = "@ id / gui2" (bobo)
things continue like the first reference (totobo, stst, and enen) as if it had never changed orientation.
Unfortunately so far the solution is to remove all constraint, guideline (if you were using it) and practically write your as a
top_totop_of in portrait will probably be a stst when it is landscape. Personally I don´t think this is due what AS 4.x suggest you is the problem
until now The only way i fopund to solve it is to delete contsraints and rewrite the XML code to solve what I´ve explained before
in summary and as an example:
what in portrait was a “totobo”
in landscape it’s probably a stst
however that does not change and that is why according to my opinion that problem occurs, and can´t be solved with the AS´s wizzard.
Solution 3 :
Had the same problem, if not not similar…
I went to Project Structure and changed my dependency from
or you can go and change it in gradle.
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
Comment posted by Tarsila Costalonga
This answer worked for me. I’m using Android Studio 4.1.2
Comment posted by Jcorretjer
This render engine is such bs. It’s enabled. Produces rendering errors. Disable it. Error still there. Enable it again and it’s gone. Big middle finger to this f-ing thing
Comment posted by Dan Abnormal
I’m on Android studio and Gradle 4.2. My rendering errors are NOT solved by disabling/enabling the engine. Seems to me that EditText is the issue; deleting the EditText from the XML makes the error go away. However, I need EditText…