2015-10-01 16:17



Probably that is newbie question, but that takes me 2 days with 0 progress. I build before Hello Gopher World on my mobile with Android Studio, but when I tried to do that same with 'basic' mobile script from I get that error:

Information:Gradle tasks [:app:compileDebugSources, :app:compileDebugAndroidTestSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
exec: "gcc": executable file not found in %PATH%
C:\gowork\bin\gomobile.exe: go build -p=4 -pkgdir=C:\gowork\pkg\gomobile/pkg_android_arm -tags="" -i -buildmode=c-shared -o=C:\Users\Pablo\AppData\Local\Temp\gomobile-work-627382299\android\src\main\jniLibs\armeabi-v7a\ C:\Users\Pablo\AppData\Local\Temp\gomobile-work-627382299\androidlib\main.go failed: exit status 2
# _/C_/Users/Pablo/AppData/Local/Temp/gomobile-work-627382299/go_hello
C:\Users\Pablo\AppData\Local\Temp\gomobile-work-627382299\go_hello\go_hellomain.go:8: imported and not used: ""
C:\Users\Pablo\AppData\Local\Temp\gomobile-work-627382299\go_hello\go_hellomain.go:9: imported and not used: ""
Error:Execution failed for task ':hello:gobind'.
> Process 'command 'C:/gowork/bin\gomobile.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 8.174 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

That is build.gradle of hello module:

plugins {
    id "" version "0.2.2"

gobind {
    pkg = ""

    GOPATH = "C:/gowork"

    GO = "C:/Go"

There is go file: (C:\gowork\src\\x\mobile\example\bind\hello\hello.go)

And (MainActivity)java file from I try to use function main():

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • doudou8783 doudou8783 6年前

    Ok, my fault if somebody will have same problem in feature there somebody explained me:

    In short I tried to build native Go app.

    点赞 评论 复制链接分享