Intellij idea14安装google-go-lang-idea-plugin插件无法指定sdk的解决办法
qq_19969471 · · 17178 次点击 · · 开始浏览idea14 和go1.4不兼容,一直报这样一个错Argument for @NotNull parameter 'virtualFile' of com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot must not be null
解决办法:
google-go-lang-idea-plugin 插件虽然好,但是官方的编译版总是更新很慢,所以需要自己编译,问了老外才知道怎么编译,编译方法如下:
I opened this project in IDEA Community 13 (or whatever the latest EAP is), 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 popups up and then you can install that in an IDEA IDE.
具体的过程,我截图如下:
intellijIDEA的首页放的是稳定版,而我们要找到测试版,直接点如下链接就能下载测试版:
http://www.jetbrains.com/idea/nextversion/index.html
如下图:
下载安装完成后,点击help菜单更新,如下图:
然后下载 idea的 golang插件源码:
https://github.com/mtoader/google-go-lang-idea-plugin
如下图:
解压到任意目录,比如c:\idea_golang
然后用idea打开这个目录,即点击菜单 File》Open
然后再设置一下环境:
分别指定:
- jdk的目录(需要去java首页下载)
- idea的安装目录
- go语言的安装目录(需要去golang的首页下载)
如下图:
设置完SDKs之后,还要在Modules页面重新指定一下idea的安装目录,看图:
最后可以Ctrl+Shift+F9编译试试,如果弹出的信息都是警告(warning)信息而没有错误信息(error),那就说明没问题了。
接下来就可以像老外说的那样,点击菜单:
Build -> Prepare for Deployment
会在项目目录生成一个jar文件。
这个就是编译好的插件了。
安装这个插件的方法是:
File》Settings》Plugins》Install plugin from disk
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
关注微信- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码` - 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传
收入到我管理的专栏 新建专栏
idea14 和go1.4不兼容,一直报这样一个错Argument for @NotNull parameter 'virtualFile' of com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot must not be null
解决办法:
google-go-lang-idea-plugin 插件虽然好,但是官方的编译版总是更新很慢,所以需要自己编译,问了老外才知道怎么编译,编译方法如下:
I opened this project in IDEA Community 13 (or whatever the latest EAP is), 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 popups up and then you can install that in an IDEA IDE.
具体的过程,我截图如下:
intellijIDEA的首页放的是稳定版,而我们要找到测试版,直接点如下链接就能下载测试版:
http://www.jetbrains.com/idea/nextversion/index.html
如下图:
下载安装完成后,点击help菜单更新,如下图:
然后下载 idea的 golang插件源码:
https://github.com/mtoader/google-go-lang-idea-plugin
如下图:
解压到任意目录,比如c:\idea_golang
然后用idea打开这个目录,即点击菜单 File》Open
然后再设置一下环境:
分别指定:
- jdk的目录(需要去java首页下载)
- idea的安装目录
- go语言的安装目录(需要去golang的首页下载)
如下图:
设置完SDKs之后,还要在Modules页面重新指定一下idea的安装目录,看图:
最后可以Ctrl+Shift+F9编译试试,如果弹出的信息都是警告(warning)信息而没有错误信息(error),那就说明没问题了。
接下来就可以像老外说的那样,点击菜单:
Build -> Prepare for Deployment
会在项目目录生成一个jar文件。
这个就是编译好的插件了。
安装这个插件的方法是:
File》Settings》Plugins》Install plugin from disk