简体   繁体   English

IntelliJ IDEA 2020.3.1(终极版)U-203.6682.168 - 无法解析符号 - Java 类

[英]IntelliJ IDEA 2020.3.1 (Ultimate Edition) U-203.6682.168 - Cannot resolve symbol - Java classes

After update to IDEA 2020.3.1, some of my projects cannot be built successfully in the IDE.更新到IDEA 2020.3.1后,我的部分项目在IDE中无法构建成功。

I'm getting我越来越

Cannot resolve symbol ''无法解析符号''

for classes defined by me.对于我定义的课程。 All classes from dependencies are loaded OK.依赖项中的所有类都加载正常。

I'm using gradle wrapper and I've tried several things to fix this issue without results:我正在使用 gradle 包装器,我尝试了几种方法来解决此问题而没有结果:

  1. Reinstalled Intellij Idea.重新安装 Intellij Idea。 Deleted local folder in AppData\Roaming\Jetbrains...\IntellijIdea2020.3已删除 AppData\Roaming\Jetbrains...\IntellijIdea2020.3 中的本地文件夹
  2. Cache Invalidation from the IDE来自 IDE 的缓存失效
  3. Deleted.gradle folder with all cached dependencies已删除.gradle 文件夹,其中包含所有缓存的依赖项
  4. Deleted project and download again from git repo.删除项目并从 git repo 重新下载。
  5. Rollback to different (older version of IDE) 2020.2.x回滚到不同的(旧版本的 IDE)2020.2.x

Project is built successfully with gradlew clean build .使用gradlew clean build成功构建项目。 The only problem is that the IDE cannot find the classes.唯一的问题是 IDE 找不到类。 Some of my projects are OK, but others are not.我的一些项目还可以,但其他项目不行。

I had the same issue (Intellij 2020.3.3) and solved by invalidating caches of Intellij (File | Invalidate Caches / Restart)我遇到了同样的问题(Intellij 2020.3.3)并通过使 Intellij 的缓存无效(文件 | 使缓存无效 / 重新启动)来解决

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

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