简体   繁体   English

设置Intellij IDEA进行插件开发 - 找不到符号PathInfo

[英]Setup Intellij IDEA for plugin development - cannot find symbol PathInfo

Followed the instructions in setting_up_environment 'IntelliJ Platform SDK DevGuide' and checkout_and_build_community : 按照setting_up_environment'IntelliJ Platform SDK DevGuide'和checkout_and_build_community中的说明操作

  • Installed the IDE 安装了IDE
  • Installed JDK 8 已安装JDK 8
  • Checked out the SDK source code from GIT 查看了GIT的SDK源代码
  • Followed the other instructions in these two pages 按照这两页中的其他说明进行操作

All the above was done twice, on an Ubuntu 15 and Windows 8.1 vm. 以上所有内容都是在Ubuntu 15和Windows 8.1 vm上完成的。 When I try to build the project, I get numerous warnings about deprecated classes and two errors: 当我尝试构建项目时,我收到大量关于弃用类和两个错误的警告:

C:\IdeaProjects\community\plugins\cvs\cvs-core\src\com\intellij\cvsSupport2\config\ProxySettings.java
    Warning:Warning:line (19)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (21)java: com.intellij.openapi.util.JDOMExternalizable in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (25)java: com.intellij.openapi.util.JDOMExternalizable in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (72)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (77)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
C:\IdeaProjects\community\plugins\cvs\cvs-core\src\com\intellij\cvsSupport2\config\ExtConfiguration.java
    Warning:Warning:line (20)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (22)java: com.intellij.openapi.util.JDOMExternalizable in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (29)java: com.intellij.openapi.util.JDOMExternalizable in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (39)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
    Warning:Warning:line (44)java: com.intellij.openapi.util.DefaultJDOMExternalizer in com.intellij.openapi.util has been deprecated
C:\IdeaProjects\community\platform\built-in-server-api\src\org\jetbrains\builtInWebServer\WebServerRootsProvider.java
    Error:Error:line (13)java: cannot find symbol
  symbol:   class PathInfo
  location: class org.jetbrains.builtInWebServer.WebServerRootsProvider
    Error:Error:line (16)java: cannot find symbol
  symbol:   class PathInfo
  location: class org.jetbrains.builtInWebServer.WebServerRootsProvider

I have googled, but failed to find anything relevant regarding PathInfo, builtInWebServer or WebServerRootsProvider. 我已经google了,但未找到任何与PathInfo,builtInWebServer或WebServerRootsProvider相关的内容。 Probably because google automatically assumes I mean 'path info' and silently mixes these results in. 可能是因为谷歌自动假设我的意思是“路径信息”并默默地混合这些结果。

I suspect it's probably something I didn't download with IDEA, such as J2EE or some Apache library, but after several hours, I'm ready to throw the towel and ask. 我怀疑它可能是我没有用IDEA下载的东西,比如J2EE或者一些Apache库,但几个小时之后,我已经准备好了。

A few comments in response to answers: 回答一些评论:

  1. Java is installed and configured in the project. 在项目中安装并配置Java。 It probably would not complain of deprecation if Java were completely missing 如果Java完全丢失,它可能不会抱怨弃用
  2. The SDK is defined as 'IDEA jdk' so it will work automatically, as per the instructions SDK被定义为'IDEA jdk',因此它将按照说明自动运行

The IDEA SDK is written partly in Kotlin, a statically-typed programming language that runs on the Java Virtual Machine. IDEA SDK部分用Kotlin编写,Kotlin是一种在Java虚拟机上运行的静态类型编程语言。

The missing PathInfo class is defined in PathInfo.kt, a Kotlin file. 丢失的PathInfo类在PathInfo.kt(Kotlin文件)中定义。

Select File | 选择文件| Settings | 设置| Plugin and click 'Install JetBrains Plugin'. 插件并单击“安装JetBrains插件”。 Select the Kotlin plugin and the error will go away. 选择Kotlin插件,错误就会消失。

可能是IntelliJ找不到Java的路径...在IntelliJ中设置JDK(已安装)的路径

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

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