为什么IntelliJ Idea无法找到GO SDK的位置? [英] Why IntelliJ Idea cannot find location of GO SDK?

查看:2648
本文介绍了为什么IntelliJ Idea无法找到GO SDK的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我下载了我在我的IntelliJ Idea中安装了 Go Language(golang.org) 0.9.15.3版本。

  2. 我在创建过程中创建了一个Go项目它要求我添加GO SDK。我给它〜/ Desktop / go / sdk ,但它无法识别它。我在事件日志中遇到这个错误:



    14:03:02 IllegalArgumentException:参数为@NotNull参数
    'virtualFile'
    com / intellij / openapi / projectRoots / impl / ProjectRootContainerImpl.addRoot
    不能为空


    任何想法IntelliJ Idea如何能够识别它将不胜感激。感谢。 解决方案

请考虑使用0.9.16的alpha版本之一。我相信alpha7可能是比alpha9更稳定的alpha9。您可以从 GitHub发布获取它们



顾名思义,v1.0.0-alpha0分支就是一个alpha版本,它处于开发的早期阶段,这就是为什么还没有发布它的原因好。

PS我是该插件的贡献者之一。


  1. I downloaded go1.4.darwin-amd64-osx10.8.tar.gz and extract it on my local directory.
  2. Based on what Installing to a custom location says I added GOROOT in env variable.
  3. Based on what Test your installation says I created a go file.
  4. I finally ran it and I got expected result as following screenshot.

  • I actually have IntelliJ v.14 however, based on this article I installed Go Language (golang.org) version 0.9.15.3 in my IntelliJ Idea.
  • I created a Go project and during creation it asked me to add GO SDK. I gave it ~/Desktop/go/sdk however it wasn't able to recognise it. I got this error in Event Log:

14:03:02 IllegalArgumentException: Argument for @NotNull parameter 'virtualFile' of com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot must not be null

Any idea how IntelliJ Idea is able to recognize it would be appreciated. Thanks.

解决方案

Please consider using one of the alpha releases for 0.9.16. I believe that alpha7 could be the more stable one rather than alpha9. You can get them from GitHub releases

The v1.0.0-alpha0 branch is, as the name implies, an alpha release and it's in the early stages of development, that's why there's no release done yet for it as well.

P.S. I'm one of the contributors to the plugin.

这篇关于为什么IntelliJ Idea无法找到GO SDK的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆