title: "Index: 0, Size: 0 View draw error" Android Studio design tab error
body: <p>I've recently updated my AS to 4.0 version. After that I put an EditText and a TextView inside of my layout, which looks like this:</p>
  <pre><code>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:orientation=&quot;vertical&quot;&gt;
  
      &lt;TextView
          android:text=&quot;EditText should be below me!&quot;
          android:textSize=&quot;20dp&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;/&gt;
  
      &lt;EditText
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:hint=&quot;I'm a hint&quot;/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  <p>However, the design tab doesn't show me the EditText at all!
  <a href="https://i.stack.imgur.com/BnPEf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BnPEf.png" alt="Design tab without the input field" /></a></p>
  <p>At the bottom of the screenshot, you can see error. Googling it didn't help me, everything I found is <a href="https://stackoverflow.com/questions/62384882/design-in-android-studio-error-index0-size0-view-draw-failed">Design in Android studio error Index:0 size:0.... View draw failed</a> question, which has no answer.</p>
  <p><strong>What I've already done</strong></p>
  <p>I invalidated caches and restarted my AS but it didn't help. Also, I've changed the app's theme from</p>
  <pre><code>&lt;style name=&quot;AppTheme&quot; parent=&quot;Theme.AppCompat.Light.DarkActionBar&quot;&gt;
  </code></pre>
  <p>to</p>
  <pre><code>&lt;style name=&quot;AppTheme&quot; parent=&quot;Base.Theme.AppCompat.Light.DarkActionBar&quot;&gt;
  </code></pre>
  <p>which had no impact. However, once I managed to change it to something like a button element style and it worked, even though it's not the solution I'm looking for. If I explicitly change the style of the EditText to things like</p>
  <pre><code>@style/Widget.AppCompat.Button.ButtonBar.AlertDialog
  </code></pre>
  <p>or</p>
  <pre><code>@style/Widget.AppCompat.Button.Borderless
  </code></pre>
  <p>I can see the EditText...</p>
  <p>I'll appreciate any help you give me, guys. Thanks in advance!</p>
  <p><strong>UPDATE</strong>:</p>
  <p>It's possible to fix the problem by switching on the &quot;Use new Layout Rendering Engine&quot; in the settings of the AS.</p>
  <p><a href="https://i.stack.imgur.com/FZnv0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FZnv0.png" alt="Fix" /></a></p>
  <p>Anyway, I hope we're able to find this thing out and fix it, guys. Thank you for your attention!</p>