英文:
How do I fix an error in intellij that prevents me from running my projects
问题
这个错误在我的 IntelliJ 中出现,现在无论我尝试运行哪个项目,都无法进行,而且相同的错误一遍又一遍地出现,似乎没有任何解决办法。我已经重新启动了程序,按照一些其他博客中的说法删除了 .idea
文件夹,但问题仍然没有解决。
错误: 模块 'JavaFundamentals' production: java.lang.ClassCastException: 无法将类 org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType 强制转换为类 org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType (org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType 和 org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType 位于加载器 java.net.URLClassLoader @2ff4acd0 的未命名模块中)
英文:
This Error showed up in my IntelliJ and now whatever project I try to run it's just not happening and the same Error shows up again and again and nothing seems to work. I restarted the program, deleted the .idea
folder as I read some other blogs, but it's not fixing anything.
Error:Module 'JavaFundamentals' production: java.lang.ClassCastException: class org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to class org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType (org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType and org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType are in unnamed module of loader java.net.URLClassLoader @2ff4acd0)
答案1
得分: 4
刚刚遇到相同的问题,我只是在菜单上点击了“构建”,然后点击了“重新构建”。
英文:
Just came across the same problem and I just clicked build on the menu and click on rebuild.
答案2
得分: 1
我从遇到类似问题的某人那里找到了一些内容,尝试一下:
> 在菜单中选择“Build > Rebuild project”。
在菜单中选择“File > Invalidate caches / Restart... > Invalidate and Restart”。
如果有安装/启用的插件,请移除最后安装/启用的插件。
检查依赖关系(特别是循环依赖关系)在“File > Project Structure... > Modules”中。
最后的机会:备份并从项目目录中移除 .idea 文件夹,然后从头开始创建新项目。
英文:
I found something from someone having a similar issue, try this:
> In menu "Build > Rebuild project".
In menu "File > Invalidate caches / Restart... > Invalidate and Restart".
Remove last installed/enabled plugins if any.
Check dependencies (especially cyclic-dependencies) in "File > Project Structure... > Modules"
The last chance: make backup & remove .idea folder from your project directory and create new project from scratch.
答案3
得分: 1
我刚刚遇到了同样的错误:“Production production: java. Lang....”,然后我只是点击了构建,然后重新构建。如果有帮助,请告诉我。谢谢。
英文:
I just encountered this same error "Production production: java. Lang...." and I just clicked on build then rebuild. Let me know if that Helps. Thanks.
答案4
得分: 0
按照此答案中的说明操作:https://stackoverflow.com/questions/27080373/cant-compile-java-project-on-intelij-idea-14-ce
这个答案(https://stackoverflow.com/questions/30464248/errormodule-name-production-java-lang-nullpointerexception)让我认为 Scala 插件可能是真正的原因,正如 @Andery 在评论中已经提到的。
如果这对您有帮助,请告诉我们。
英文:
Follow the instructions found in answer: https://stackoverflow.com/questions/27080373/cant-compile-java-project-on-intelij-idea-14-ce
This answer (https://stackoverflow.com/questions/30464248/errormodule-name-production-java-lang-nullpointerexception) let me assume that the scala plugin could be the real cause, as @Andery already mentioned in the comment.
Let us know if that helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论