简体   繁体   English

IntelliJ 无法识别来自 Maven 库源的导入

[英]IntelliJ does not recognize imports from sources of maven libraries

When I navigate to an in-house library class, the decompiled source's import statements work fine, but when I specify the local directory containing the actual sources of the library, the source file opens but the imports fail there.当我导航到内部库类时,反编译源的导入语句工作正常,但是当我指定包含库实际源的本地目录时,源文件打开但导入在那里失败。 This problem doesn't occur for the JDK or sources from central maven repositories. JDK 或来自中央 maven 存储库的源不会出现此问题。

For example, in import abClazz , Clazz is recognized in the decompiled source but not in the actual source from a local directory ( Cannot resolve symbol 'Clazz' ).例如,在import abClazzClazz在反编译源识别,但不能从本地目录中的实际源( Cannot resolve symbol 'Clazz' )。

Any ideas?有任何想法吗? (no pun intended) (没有双关语意)

Version: IDEA 14.1.3 Ultimate.版本:IDEA 14.1.3 终极版。 Libraries specified via Maven.通过 Maven 指定的库。

可能导致问题的另一件事是您安装的库没有添加到类路径中,一旦您这样做,Intellij 将识别所有库。

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

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