title: Android studio 3.0 rendering "Exception raised during rendering" and "onMeasure error"
body: <p>I got some rendering problem after I updated my Android studio to version 3.0.</p>
  
  <p>I've tried to change the SDK version like this but still didn't work.</p>
  
  <p><a href="https://i.stack.imgur.com/fzgvU.png" rel="nofollow noreferrer">Picture here</a></p>
  
  <p>My JDK version is 1.8 and here is some of my gradle information.</p>
  
  <pre><code>compileSdkVersion 26
  
  defaultConfig {
      applicationId "com.example.wheathermaster"
      minSdkVersion 19
      targetSdkVersion 26
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      multiDexEnabled true
  }
  </code></pre>
  
  <p>I also tried "Clean project" and "Invalidate Cache/ Restart", but none of them works.</p>
  
  <p>And here are my error messages: </p>
  
  <p>Exception raised during rendering</p>
  
  <pre><code>java.lang.NullPointerException
  at android.graphics.BidiRenderer.getScriptFont(BidiRenderer.java:290)
  at android.graphics.BidiRenderer.getScriptRuns(BidiRenderer.java:280)
  at android.graphics.BidiRenderer.renderText(BidiRenderer.java:133)
  at android.graphics.BidiRenderer.renderText(BidiRenderer.java:108)
  at android.graphics.Paint_Delegate.measureText(Paint_Delegate.java:1318)
  at android.graphics.Paint_Delegate.nGetTextAdvances(Paint_Delegate.java:975)
  at android.graphics.Paint_Delegate.nGetRunAdvance(Paint_Delegate.java:1154)
  at android.graphics.Paint.nGetRunAdvance(Paint.java)
  at android.graphics.Paint.getRunAdvance(Paint.java:2734)
  at android.graphics.Paint.getRunAdvance(Paint.java:2766)
  at android.text.TextLine.getRunAdvance(TextLine.java:732)
  at android.text.TextLine.handleText(TextLine.java:778)
  at android.text.TextLine.handleRun(TextLine.java:1018)
  at android.text.TextLine.measureRun(TextLine.java:417)
  at android.text.TextLine.measure(TextLine.java:307)
  at android.text.TextLine.metrics(TextLine.java:281)
  at android.text.BoringLayout.isBoring(BoringLayout.java:294)
  at android.widget.TextView.makeSingleLayout(TextView.java:7960)
  at android.widget.TextView.makeNewLayout(TextView.java:7853)
  at android.widget.TextView.assumeLayout(TextView.java:7754)
  at android.widget.TextView.onDraw(TextView.java:6807)
  at android.view.View.draw(View.java:19192)
  at android.view.View.draw(View.java:19062)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19060)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19195)
  at android.view.View.draw(View.java:19062)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19060)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19060)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19060)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4236)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:63)
  at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
  at android.view.View.draw(View.java:19195)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:403)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:541)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:424)
  at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:108)
  at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154)
  at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136)
  at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$5(RenderTask.java:757)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>onMeasure :</p>
  
  <pre><code>java.lang.NullPointerException
  at android.graphics.BidiRenderer.getScriptFont(BidiRenderer.java:290)
  at android.graphics.BidiRenderer.getScriptRuns(BidiRenderer.java:280)
  at android.graphics.BidiRenderer.renderText(BidiRenderer.java:133)
  at android.graphics.BidiRenderer.renderText(BidiRenderer.java:108)
  at android.graphics.Paint_Delegate.measureText(Paint_Delegate.java:1318)
  at android.graphics.Paint_Delegate.nGetTextAdvances(Paint_Delegate.java:975)
  at android.graphics.Paint_Delegate.nGetRunAdvance(Paint_Delegate.java:1154)
  at android.graphics.Paint.nGetRunAdvance(Paint.java)
  at android.graphics.Paint.getRunAdvance(Paint.java:2734)
  at android.graphics.Paint.getRunAdvance(Paint.java:2766)
  at android.text.TextLine.getRunAdvance(TextLine.java:732)
  at android.text.TextLine.handleText(TextLine.java:778)
  at android.text.TextLine.handleRun(TextLine.java:1018)
  at android.text.TextLine.measureRun(TextLine.java:417)
  at android.text.TextLine.measure(TextLine.java:307)
  at android.text.TextLine.metrics(TextLine.java:281)
  at android.text.BoringLayout.isBoring(BoringLayout.java:294)
  at android.widget.TextView.onMeasure(TextView.java:8125)
  at android.view.View.measure(View.java:22071)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
  at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
  at android.view.View.measure(View.java:22071)
  at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1148)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:687)
  at android.view.View.measure(View.java:22071)
  at android.widget.LinearLayout.measureVertical(LinearLayout.java:958)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
  at android.view.View.measure(View.java:22071)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
  at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
  at android.support.v7.widget.ContentFrameLayout.onMeasure_Original(ContentFrameLayout.java:139)
  at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java)
  at android.view.View.measure(View.java:22071)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6602)
  at android.support.v7.widget.ActionBarOverlayLayout.onMeasure_Original(ActionBarOverlayLayout.java:400)
  at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java)
  at android.view.View.measure(View.java:22071)
  at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
  at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
  at android.view.View.measure(View.java:22071)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:590)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:343)
  at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:384)
  at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
  at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:544)
  at com.android.tools.idea.rendering.RenderTask.lambda$inflate$3(RenderTask.java:678)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>