[英]Why won't my IDEA projects build?
I am building a software platform , and as a proof of concept (and to determine what it requires), I'm building an instant messenger called Telegram RP, using my platform repos listed here: https://github.com/BlueHuskyStudios/Blue-Husky-Software-Platform 我正在构建一个软件平台 ,并作为概念证明(并确定它需要什么),我正在构建一个名为Telegram RP的即时消息,使用我在此处列出的平台回购: https : //github.com/BlueHuskyStudios/蓝赫斯基,软件平台
Now, I've made the decision to separate the JVM-specific code from the generic code, but upon my first step doing so, it won't compile. 现在,我已决定将特定于JVM的代码与通用代码分开,但是在我第一步这样做时,它将无法编译。
I'm stumped. 我很难过。 I've triple-checked language-level visibilities, removed and re-added both Git and IDEA modules, triple-checked the dependency hierarchies, ensured parallel builds are off... and yet it still claims that there's an unresolved reference at build time , despite the editor letting me middle-/control-click to navigate to the import.
我已经对语言级别的可见性进行了三重检查,删除并重新添加了Git和IDEA模块,对依赖性层次结构进行了三重检查,确保了并行构建已关闭......但它仍然声称在构建时存在未解析的引用尽管编辑让我中间/控制点击导航到导入。
Can anyone help me understand how to make this understand that the package it's complaining about is actually there when I click build andor run? 任何人都可以帮助我理解如何让它理解当我点击构建和运行时,它所抱怨的软件包实际上存在吗?
Here's an SSCCE of my setup , which should compile just fine once all repos are cloned: https://github.com/BenLeggiero/SO-SSCCE-45271471 这是我的设置的SSCCE,一旦克隆所有回购,它应该编译得很好: https : //github.com/BenLeggiero/SO-SSCCE-45271471
Here's the repo containing the project in question: https://github.com/BenLeggiero/Telegram-RP ( permalink to repo when I asked this question ) 这是包含有问题的项目的repo: https : //github.com/BenLeggiero/Telegram-RP ( 当我问这个问题时永久链接到repo )
Specifically, this sub-repo: https://github.com/BlueHuskyStudios/Husky-UI/tree/For-Telegram-RP 具体来说,这个子仓库: https : //github.com/BlueHuskyStudios/Husky-UI/tree/For-Telegram-RP
Here's the line that's failing: https://github.com/BlueHuskyStudios/Husky-UI/blob/6887f492c37583d82b49ebf36b12d68a3a1dcb32/JVM/src/org/bh/tools/ui/swing/Graphics%20Extensions.kt#L8 这是失败的路线: https : //github.com/BlueHuskyStudios/Husky-UI/blob/6887f492c37583d82b49ebf36b12d68a3a1dcb32/JVM/src/org/bh/tools/ui/swing/Graphics%20Extensions.kt#L8
import org.bh.tools.ui.generic.geometry.FractionOval
^ ~~~~~
Error:(8, 24) Kotlin: Unresolved reference: generic
This didn't happen before I moved Desktop-JVM-specific code from Husky UI/Core , to Husky UI/JVM , so I must assume it involves that... I just can't figure out why. 在我将特定于Desktop-JVM的代码从Husky UI / Core移动 到Husky UI / JVM之前,这种情况没有发生,所以我必须假设它涉及到......我只是无法弄清楚原因。
My environment: 我的环境:
IntelliJ IDEA 2017.2
IntelliJ IDEA 2017.2
Build #IC-172.3317.76, built on July 15, 2017Build#IC-172.3317.76,建于2017年7月15日
JRE: 1.8.0_152-release-915-b5 amd64JRE:1.8.0_152-release-915-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains sroJVM:JetBrains sro的OpenJDK 64位服务器VM
Windows 10 10.0Windows 10 10.0
Got it figured after messing around a while. 在弄乱了一段时间后想到了它。 I'll post the
git diff
output so you can apply it directly to your files. 我将发布
git diff
输出,以便您可以将其直接应用到您的文件中。
First, there's changes to be done in the submodule lib/Husky-UI/JVM/Husky UI JVM/JVM.iml
(remember: you should edit the proper repository and update this project's git submodule): 首先,要在子模块
lib/Husky-UI/JVM/Husky UI JVM/JVM.iml
(请记住:您应该编辑正确的存储库并更新此项目的git子模块):
- <orderEntry type="module" module-name="Husky UI/Core" exported="" />
+ <orderEntry type="module" module-name="Husky UI" exported="" />
Then go after Core/Core.iml
and remove those 2 lines: 然后去
Core/Core.iml
并删除这两行:
- <orderEntry type="module" module-name="Husky UI/Core" />
- <orderEntry type="module" module-name="Husky UI/JVM" />
Finally,change Desktop JVM/Desktop JVM.iml
: 最后,更改
Desktop JVM/Desktop JVM.iml
:
+ <orderEntry type="module" module-name="Husky UI" exported="" />
+ <orderEntry type="module" module-name="Husky IO" exported="" />
+ <orderEntry type="module" module-name="JVM" exported="" />
<orderEntry type="module" module-name="Blue Base" />
- <orderEntry type="module" module-name="Husky IO" />
<orderEntry type="module" module-name="Core" />
- <orderEntry type="module" module-name="Husky UI/Core" />
- <orderEntry type="module" module-name="Husky UI/JVM" />
Tell me how it worked out for you. 告诉我它是如何为你工作的。
It is all about module name changes after your refactoring, so the dependencies cannot be found. 在重构之后,所有关于模块名称更改都是如此,因此无法找到依赖项。
1. In Telegram-RP/lib/Husky-UI/JVM/Husky UI JVM/JVM.iml
changes 1.在
Telegram-RP/lib/Husky-UI/JVM/Husky UI JVM/JVM.iml
更改
<orderEntry type="module" module-name="Husky UI/Core" exported="" />
to 至
<orderEntry type="module" module-name="Husky UI" exported="" />
2. In Telegram-RP/Desktop JVM/Desktop JVM.iml
2.在
Telegram-RP/Desktop JVM/Desktop JVM.iml
changes 变化
<orderEntry type="module" module-name="Husky UI/Core" />
<orderEntry type="module" module-name="Husky UI/JVM" />
to 至
<orderEntry type="module" module-name="Husky UI" />
<orderEntry type="module" module-name="JVM" />
As a matter of fact, you can see module names from the Project
view in bold text : 事实上,您可以在
Project
视图中以粗体文本查看模块名称:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.