This is a creation in Article, where the information may have evolved or changed.
IDEA14 and go1.4 not compatible, has been reported such a mistake argument for @NotNull parameter ' virtualfile ' of com/intellij/openapi/projectroots/impl/ Projectrootcontainerimpl.addroot must not being null
Workaround:
Google-go-lang-idea-plugin plug-in, although good, but the official version of the compiler is always updated very slowly, so need to compile themselves, asked the foreigner to know how to compile, the method is as follows:
I opened this project in Idea Community (or whatever the latest EAP are), then choose the SDK as the program folder (c \ Program Files\jetbrains\intellik idea Community Edition) and then went to Build, Prepare for Deployment. It ' ll save a jar file in the location that's popups up and then you can install the that in an idea IDE.
The specific process I have is as follows:
Intellijidea on the home page is stable version, and we want to find the beta version, directly click the following link to download the beta version:
Http://www.jetbrains.com/idea/nextversion/index.html
Such as:
After the download installation is complete, click on the Help menu update, such as:
Then download the idea of the Golang plugin source code:
Https://github.com/mtoader/google-go-lang-idea-plugin
Such as:
Extract to any directory, such as C:\idea_golang
Then open the directory with idea, click on the menu File "open
Then set the environment:
Specify separately:
- JDK directory (need to go to the Java homepage to download)
- The installation directory of IDEA
- Go Language installation directory (need to go to Golang's homepage to download)
Such as:
After setting up SDKs, you also need to re-specify the idea's installation directory on the modules page to see the diagram:
Finally can ctrl+shift+f9 compile to try, if the information that pops up is warning (warning) information and no error message, that means no problem.
Next, as the foreigner said, click on the menu:
Build-Prepare for Deployment
A jar file is generated in the project directory.
This is the compiled plug-in.
The method for installing this plugin is:
File "Settings" Plugins "Install plugin from disk