Google Go语言插件与AndroidStudio

huangapple go评论105阅读模式
英文:

Google Go language plugin with AndroidStudio

问题

我正在使用AndroidStudio 1.2.2,并且已经安装了IntelliJ Idea的Google Go语言插件。我配置了GOPATH,并在cmd中编译和运行了第一个HelloWorld go程序,但我想开始学习在AndroidStudio中制作Android Go应用程序。

但是当我想运行test1.go文件时,我遇到了错误:

运行test1.go时出错:此项目未定义Go SDK

我在其他论坛上找到了解决方法:

文件 > 项目结构

但在那里,我只能添加android/java库模块等(我之前添加了其他java库模块和google-play-services)。

我也不知道Go SDK必须是C:\GoC:\Go\bin

英文:

I am using AndroidStudio 1.2.2 and I have installed Google Go language plugin for IntelliJ Idea. I configure GOPATH and I compile and run first HelloWorld go in cmd, but i want to start learning make Android Go applications in AndroidStudio.

But when i want to run file test1.go i get error:

Error running test1.go: No Go Sdk defined for this project

I found on other forum to do this by:

File > Project Structure

but there I can only to add android/java library module and etc., (I add other java library modules, and google-play-services before).

I don't know too about Go SDK must to be:C:\Go or C:\Go\bin

答案1

得分: 3

如果您还没有安装,请从此处安装最新版本之一:https://github.com/go-lang-plugin-org/go-lang-idea-plugin#pre-release-builds(可以选择alpha或nightly版本)。
然后,您可以将SDK指向C:\ Go(如果Go SDK安装在那里)。

希望对您有所帮助。

英文:

If you haven't installed already, install one of the latest version from here: https://github.com/go-lang-plugin-org/go-lang-idea-plugin#pre-release-builds (either alpha or nightly).
Then you can simply point the SDK to C:\Go (if that's where the Go SDK is installed).

Hope it helps.

huangapple
  • 本文由 发表于 2015年9月26日 19:03:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/32796464.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定