简体   繁体   English

转到 Android Studio 2.1 后的渲染问题

[英]rendering issue after going to Android Studio 2.1

After migrating over to Android Studio 2.1 I can't render xml files.迁移到 Android Studio 2.1 后,我无法呈现 xml 文件。 It says...它说...

Android N Requires the IDE to be running with Java 1.8 or later Install a supported JDK. Android N 要求 IDE 运行 Java 1.8 或更高版本 安装受支持的 JDK。

But that doesn't make any sense because... 1. I'm not specifying "N".但这没有任何意义,因为... 1. 我没有指定“N”。 compileSdkVersion 15 buildToolsVersion "22.0.1" 2. My project structure says I AM running Java 1.8 pointing my JDK location to C:\\Program Files\\Java\\jdk1.8.0_25 So what is wrong? compileSdkVersion 15 buildToolsVersion "22.0.1" 2. 我的项目结构说我正在运行 Java 1.8 将我的 JDK 位置指向 C:\\Program Files\\Java\\jdk1.8.0_25 那么有什么问题呢? Thanks, Gary谢谢,加里

Quoting myself from Version 7.3 of my book :我的书的7.3 版中引用自己的话:

You may get a "Rendering Problems" overlay, atop the preview pane:您可能会在预览窗格的顶部看到“渲染问题”叠加层:

Android Studio 中的“渲染问题”

This is commonplace with Android Studio.这在 Android Studio 中很常见。 In this case, look on the toolbar above the preview area.在这种情况下,请查看预览区域上方的工具栏。 In the screenshot shown above, you will notice that the right-hand element in that toolbar is the green "bugdroid" mascot, followed by "N" and a drop-down arrow.在上面显示的屏幕截图中,您会注意到该工具栏中的右侧元素是绿色的“bugdroid”吉祥物,后跟“N”和一个下拉箭头。 This indicates that the layout preview is attempting to use the rules for the N Developer Preview, and that apparently has bugs.这表明布局预览正在尝试使用 N Developer Preview 的规则,并且显然存在错误。 Switch that drop-down value to something else, such as "23", which should clear up the "Rendering Problems" issue.将该下拉值切换为其他值,例如“23”,这应该可以解决“渲染问题”问题。

never met such problem.从来没有遇到过这样的问题。 you may want to click File->Project Stucture->SDK Location to set JDK as 1.8.您可能需要单击 File->Project Stucture->SDK Location 将 JDK 设置为 1.8。 hope this helps.希望这可以帮助。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM