不能在 jfoenix 中使用 Intellij 的场景构建器 [英] cannot use intellij's scenebuilder with jfoenix

查看:94
本文介绍了不能在 jfoenix 中使用 Intellij 的场景构建器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 java 9.0.4 创建了一个 javafx 项目.代码可以编译并运行.我可以使用内部场景构建器.

I have created a javafx project using java 9.0.4. The code can be compiled and works. and I can use the Internal sceneBuilder.

但是当我从 Jfoenix 9.0.1 库中导入一个元素时,我不能再使用 SceneBuilder.

but when I import an element from the Jfoenix 9.0.1 library I can't use the sceneBuilder anymore.

我收到此错误:

java.lang.UnsupportedClassVersionError: com/jfoenix/controls/JFXButton 已由更新版本的 Java Runtime(类文件版本 53.0)编译,此版本的 Java Runtime 仅识别最高 52.0 的类文件版本

java.lang.UnsupportedClassVersionError: com/jfoenix/controls/JFXButton has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

我也将库添加到项目结构中.

also I've added the library to the project structure.

有没有办法更改这部分使用的 Java Runtime 版本?

Is there a way to change the version of Java Runtime that this part uses?

推荐答案

您可以考虑使用 external场景构建器.确保您使用正确版本的 Scenebuilder 和正确的 Java 版本.此后,在您的 IntelliJ 中,按 Ctrl+Alt+S -> 语言和框架 -> JavaFX 并将其链接到您的 SceneBuilder,然后您可以导入您的库.

You can consider using an external scene builder. Make sure you are using the correct version of scenebuilder with the correct version of Java. Thereafter in your IntelliJ, press Ctrl+Alt+S -> Language and Framework -> JavaFX and link it to your SceneBuilder, you can then import your library.

还要确保你的项目库,JFoenix 库版本都是 9.x

Also make sure your project library, JFoenix library version is both 9.x

这篇关于不能在 jfoenix 中使用 Intellij 的场景构建器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆