Intellij IDEA 2019.3,JDK 11.0.3中的Maven Java项目:无法解析符号'java'但仍可编译 [英] Maven java project in Intellij IDEA 2019.3, JDK 11.0.3: Cannot resolve symbol 'java' but still compile

查看:289
本文介绍了Intellij IDEA 2019.3,JDK 11.0.3中的Maven Java项目:无法解析符号'java'但仍可编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所拥有的:
-Intellij IDEA 2019.3,捆绑JDK 11.0.3
-具有项目JDK的Maven项目:捆绑的JDK

我的问题:
对于任何java.导入,我都会收到错误Cannot resolve symbol ... ,但我仍然可以正确编译.

我完全意识到,很多人已经讨论了这个问题,当然我已经尝试了所有问题:
-使用对话框安装JDK"一千次以再次设置项目JDK -验证所有模块和项目使用正确的语言级别11 -无效的缓存/重新启动
-删除文件<project name>.iml
-删除.idea目录
-重新导入整个Maven项目

What I have:
- Intellij IDEA 2019.3, bundled JDK 11.0.3
- A Maven project with project JDK: the bundled JDK

My problem:
For any java. imports I get the error Cannot resolve symbol ... but I can still compile correctly.

I'm totally aware that a lot of people already discussed this problem, and of course I have tried all of it:
- Use the dialog 'Setup JDK' a thousand times to set the project JDK again - Validate that all modules and the project use the correct language level 11 - Invalidate Cache / Restart
- Delete the file <project name>.iml
- Delete the .idea directory
- Reimport the whole maven project

推荐答案

问题与捆绑的JDK有关:我已经手动安装了另一个JDK 11.0.4,将其设置为项目JDK,现在可以使用

The problem is connected with the bundled JDK: I have installed manually another JDK 11.0.4, set it as project JDK and now it works

这篇关于Intellij IDEA 2019.3,JDK 11.0.3中的Maven Java项目:无法解析符号'java'但仍可编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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