java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at com.android.ninepatch.NinePatchChunk.draw(NinePatchChunk.java:190)
at com.android.ninepatch.NinePatchChunk.draw(NinePatchChunk.java:106)
at android.graphics.BaseCanvas_Delegate$1.draw(BaseCanvas_Delegate.java:468)
at com.android.layoutlib.bridge.impl.GcSnapshot.drawInLayer(GcSnapshot.java:697)
at com.android.layoutlib.bridge.impl.GcSnapshot.draw(GcSnapshot.java:587)
at android.graphics.BaseCanvas_Delegate.nDrawNinePatch(BaseCanvas_Delegate.java:465)
at android.graphics.BaseCanvas.nDrawNinePatch(BaseCanvas.java)
at android.graphics.BaseCanvas.drawPatch(BaseCanvas.java:307)
at android.graphics.Canvas.drawPatch(Canvas.java:1885)
at android.graphics.NinePatch.draw(NinePatch.java:217)
at android.graphics.drawable.NinePatchDrawable.draw(NinePatchDrawable.java:249)
at android.graphics.drawable.DrawableContainer.draw(DrawableContainer.java:87)
at android.graphics.drawable.DrawableWrapper.draw(DrawableWrapper.java:240)
at android.view.View.drawBackground(View.java:22581)
at android.view.View.draw_Original(View.java:22342)
at android.view.View_Delegate.draw(View_Delegate.java:56)
at android.view.View.draw(View.java:22323)
at android.view.View.draw_Original(View.java:22223)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:21995)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4516)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1882)
at android.view.View.draw_Original(View.java:22221)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:21995)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4516)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw_Original(View.java:22221)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:21995)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4516)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw_Original(View.java:22221)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:21995)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4516)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.draw_Original(View.java:22353)
at android.view.View_Delegate.draw(View_Delegate.java:56)
at android.view.View.draw(View.java:22323)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:401)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:562)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:422)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:110)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:137)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:119)
at com.android.tools.idea.rendering.RenderTask.lambda$null$12(RenderTask.java:992)
at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$2.run(RenderExecutor.kt:174)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Android Studio layout design Render problem
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- CSDN专家-sinJack 2021-06-25 21:49关注
Index 0 out of bounds for length 0。数组越界异常
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 bat批处理,关于数据复制问题
- ¥50 同步两个不同结果的array中某些属性
- ¥15 悬赏15远程操控解决问题
- ¥15 CST复制的模型无法单独修改参数?
- ¥15 前端页面想做个定时任务,但是使用requestAnimationFrame,setinterval和settimeout都不行
- ¥15 根据以下文字信息,做EA模型图
- ¥15 删除虚拟显示器驱动 删除所有 Xorg 配置文件 删除显示器缓存文件 重启系统 可是依旧无法退出虚拟显示器
- ¥15 vscode程序一直报同样的错,如何解决?
- ¥15 关于使用unity中遇到的问题
- ¥15 开放世界如何写线性关卡的用例(类似原神)