如何解决Android Studio渲染消息:将SDK更新到最新后,行列式为0?

时间:2016-04-05 19:13:40

标签: android rendering

我正在Android Studio上开发移动应用程序,它要求我更新SDK(现在是API 23 rev 3)。

现在,它给我渲染问题:渲染期间引发异常:行列式为0

详细说明:

java.awt.geom.NoninvertibleTransformException: Determinant is 0
at java.awt.geom.AffineTransform.createInverse(AffineTransform.java:2714)
at sun.font.GlyphLayout$SDCache.<init>(GlyphLayout.java:233)
at sun.font.GlyphLayout$SDCache.get(GlyphLayout.java:336)
at sun.font.GlyphLayout.layout(GlyphLayout.java:383)
at java.awt.Font.layoutGlyphVector(Font.java:2637)
at android.graphics.BidiRenderer.render(BidiRenderer.java:228)
at android.graphics.BidiRenderer.renderScript(BidiRenderer.java:166)
at android.graphics.BidiRenderer.renderText(BidiRenderer.java:144)
at android.graphics.Canvas_Delegate$11.draw(Canvas_Delegate.java:1017)
at com.android.layoutlib.bridge.impl.GcSnapshot.drawOnGraphics(GcSnapshot.java:680)
at com.android.layoutlib.bridge.impl.GcSnapshot.drawInLayer(GcSnapshot.java:615)
at com.android.layoutlib.bridge.impl.GcSnapshot.draw(GcSnapshot.java:583)
at android.graphics.Canvas_Delegate.draw(Canvas_Delegate.java:969)
at android.graphics.Canvas_Delegate.drawText(Canvas_Delegate.java:992)
at android.graphics.Canvas_Delegate.native_drawText(Canvas_Delegate.java:879)
at android.graphics.Canvas_Delegate.native_drawText(Canvas_Delegate.java:891)
at android.graphics.Canvas.native_drawText(Canvas.java)
at android.graphics.Canvas.drawText(Canvas.java:1656)
at android.text.BoringLayout.draw(BoringLayout.java:401)
at android.widget.TextView.onDraw(TextView.java:5717)
at android.view.View.draw(View.java:16178)
at android.view.View.draw(View.java:16090)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16181)
at android.view.View.draw(View.java:16090)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16088)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16088)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16181)
at android.view.View.draw(View.java:16090)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16088)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16181)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:455)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:428)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:362)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
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)

如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

我发现问题是视图缩放为0!

解决方案是将所有0比例视图的可见性设置为INVISIBLE。

现在我必须在动画制作之前以编程方式将它们设置为VISIBLE。