我似乎无法在Android Studio中呈现UI。 我之前从未遇到过这个问题。
我尝试过切换API目标&我重新安装了Android Studio。
Render error
ActiveTool: com.intellij.designer.designSurface.tools.SelectionTool@49803f68
SDK: Android 5.0.1 - API 21
java.lang.RuntimeException: Class file too large!
at org.jetbrains.asm4.ClassWriter.toByteArray(ClassWriter.java:777)
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:70)
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:45)
at com.android.tools.idea.rendering.RenderClassLoader.convertClass(RenderClassLoader.java:160)
at com.android.tools.idea.rendering.RenderClassLoader.loadClass(RenderClassLoader.java:144)
at com.android.tools.idea.rendering.RenderClassLoader.loadClassFile(RenderClassLoader.java:125)
at org.jetbrains.android.uipreview.ProjectClassLoader.loadClassFile(ProjectClassLoader.java:284)
at com.android.tools.idea.rendering.RenderClassLoader.loadClassFromClassPath(RenderClassLoader.java:118)
at org.jetbrains.android.uipreview.ProjectClassLoader.loadClassFromModule(ProjectClassLoader.java:199)
at org.jetbrains.android.uipreview.ProjectClassLoader.loadClassFromModuleOrDependency(ProjectClassLoader.java:133)
at org.jetbrains.android.uipreview.ProjectClassLoader.load(ProjectClassLoader.java:119)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:53)
at org.jetbrains.android.uipreview.ProjectClassLoader.findClass(ProjectClassLoader.java:81)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredClasses0(Native Method)
at java.lang.Class.getDeclaredClasses(Class.java:1735)
at org.jetbrains.android.uipreview.ViewLoader.parseClass(ViewLoader.java:494)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClass(ViewLoader.java:478)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClassSilently(ViewLoader.java:450)
at com.android.tools.idea.rendering.LayoutlibCallback.loadAndParseRClass(LayoutlibCallback.java:635)
at com.android.tools.idea.rendering.RenderService.<init>(RenderService.java:356)
at com.android.tools.idea.rendering.RenderService.create(RenderService.java:231)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:475)
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:327)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
答案 0 :(得分:1)
我发现Android Studio 2.0存在同样的问题,并通过在Android Studio中创建任何新项目来解决问题。它可能是Android Studio中的一个错误,在2.0版本中尚未修复。