title: string index out of bounds leads to build not being finished
body: <p>In my android studio I'm not able to see my xml editor preview, everytime I try to see the window it displays this message: "<em>waiting for build to finish</em>".
  I suspect it to be the cause of a <strong>String index out of bounds exeption</strong> I'm having everytime I start up my android studio.</p>
  
  <p><strong>String index out of bounds exeption</strong>:</p>
  
  <pre><code>String index out of range: 0
  java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java:658)
  </code></pre>
  
  <p>full stacktrace:</p>
  
  <p><a href="https://pastebin.com/t0XnjTFL" rel="nofollow noreferrer">https://pastebin.com/t0XnjTFL</a></p>
  
  <p>also autocompletion is somehow disabled (even tough it is turned on) in my xml editor.</p>