Java IntelliJ IDEA 渲染错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18872426/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 11:48:58  来源:igfitidea点击:

IntelliJ IDEA Render error

javaandroidintellij-idea

提问by Jesus

I'm trying to set up IntelliJ IDEA for programming android but I can't render the main.xml.

我正在尝试为 Android 编程设置 IntelliJ IDEA,但我无法呈现 main.xml。

org.jetbrains.android.uipreview.RenderingException: This version of the rendering library is more recent than your version of IntelliJ IDEA. Please update IntelliJ IDEA at org.jetbrains.android.uipreview.RenderServiceFactory.loadLibrary(RenderServiceFactory.java:158) at org.jetbrains.android.uipreview.RenderServiceFactory.create(RenderServiceFactory.java:73) at org.jetbrains.android.sdk.AndroidTargetData.getRenderServiceFactory(AndroidTargetData.java:132) at org.jetbrains.android.uipreview.RenderUtil.renderLayout(RenderUtil.java:105) at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$8.run(AndroidDesignerEditorPanel.java:346) 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.Alarm$Request$1.run(Alarm.java:289) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)

org.jetbrains.android.uipreview.RenderingException:此版本的渲染库比您的 IntelliJ IDEA 版本更新。请在 org.jetbrains.android.uipreview.RenderServiceFactory.loadLibrary(RenderServiceFactory.java:158) 在 org.jetbrains.android.uipreview.RenderServiceFactory.create(RenderServiceFactory.java:73) 在 org.jetbrains.android.sdk 更新 IntelliJ IDEA .AndroidTargetData.getRenderServiceFactory(AndroidTargetData.java:132) 在 org.jetbrains.android.uipreview.RenderUtil.renderLayout(RenderUtil.java:105) 在 com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$8.run(AndroidDesignerEditorPanel.java: 346) 在 com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320) 在 com.intellij.util.ui.update.MergingUpdateQueue。

enter image description here

在此处输入图片说明

This is the exception I get when I try to open the main.xml with the Android GUI Designer (IntelliJ Utility). I have the latest IDE version so I don't know what's happening here.

这是我尝试使用 Android GUI 设计器(IntelliJ 实用程序)打开 main.xml 时遇到的异常。我有最新的 IDE 版本,所以我不知道这里发生了什么。

采纳答案by Bersh

IDEA does not have a render version for 4.3 yet. Try select version of Android that is less than 4.3 in the dropdown in the preview. It works for me.

IDEA 还没有 4.3 的渲染版本。尝试在预览的下拉列表中选择低于 4.3 的 Android 版本。这个对我有用。

回答by Lennart

There seems to be an incompatibility between IDEA and the latest release of the Android SDK Build-tools (18.1). Installing the slightly older version 18.0.1 should fix the problem.

IDEA 与最新版本的 Android SDK Build-tools (18.1) 之间似乎不兼容。安装稍旧的版本 18.0.1 应该可以解决问题。

回答by sandalone

In the preview tab simply open the last drop-down list and pick the lower Android SDK. In my case, I picked Android 4.4.2 and the preview appeared instantly.

在预览选项卡中,只需打开最后一个下拉列表并选择较低的 Android SDK。就我而言,我选择了 Android 4.4.2,预览立即出现。

回答by tgfmis

In the preview tab simply open the last drop-down list and pick the lower Android SDK. In my case, I picked Android 4.4.2 and the preview appeared instantly.

在预览选项卡中,只需打开最后一个下拉列表并选择较低的 Android SDK。就我而言,我选择了 Android 4.4.2,预览立即出现。

it works for me

这个对我有用