简体   繁体   English

Intellij IDEA,java,maven,不能使用导入库

[英]Intellij IDEA, java, maven, can´t use imported library

I have setup a JavaFX project in Intellij IDEA.我在 Intellij IDEA 中设置了一个 JavaFX 项目。 JAVAFX works fine. JAVAFX 工作正常。 Now I wanted to import org.json.simple.. So I added at to pom.xml and it downloaded the.jar file.现在我想导入 org.json.simple.. 所以我添加到 pom.xml 并下载了.jar 文件。 Now I want to use it in Java class.现在我想在 Java class 中使用它。 But it shows an error:但它显示一个错误:

Cannot resolve symbol 'JSONObject'无法解析符号“JSONObject”

and as solutions it shows me this:作为解决方案,它向我展示了这一点:

快速修复

but none of this worked.但这一切都没有奏效。 I run already maven clean install I updated the Maven Repositories (default local and remote) I tried adding it as downloaded.jar file The error is still there.我已经运行 maven 全新安装我更新了 Maven 存储库(默认本地和远程)我尝试将其添加为下载。jar 文件错误仍然存在。

Click on the reload all maven projects icon in intellij.单击 intellij 中的重新加载所有 maven 项目图标。

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

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