Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Golang-gomobile基本脚本编译错误_Java_Android_Go - Fatal编程技术网

Java Golang-gomobile基本脚本编译错误

Java Golang-gomobile基本脚本编译错误,java,android,go,Java,Android,Go,也许这是个新手问题,但这需要我2天的时间才能取得0的进步。 我用Android Studio在我的手机上构建Hello Gopher World之前,但当我尝试用来自 我得到了这个错误: Information:Gradle tasks [:app:compileDebugSources, :app:compileDebugAndroidTestSources] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDe

也许这是个新手问题,但这需要我2天的时间才能取得0的进步。 我用Android Studio在我的手机上构建Hello Gopher World之前,但当我尝试用来自 我得到了这个错误:

Information:Gradle tasks [:app:compileDebugSources, :app:compileDebugAndroidTestSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:hello:gobind
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\libgojni.so 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: "golang.org/x/mobile/bind/seq"
C:\Users\Pablo\AppData\Local\Temp\gomobile-work-627382299\go_hello\go_hellomain.go:9: imported and not used: "golang.org/x/mobile/example/bind/hello"
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
这就是hello模块的build.gradle:

plugins {
    id "org.golang.mobile.bind" version "0.2.2"
}

gobind {
    pkg = "golang.org/x/mobile/example/bind/hello"

    GOPATH = "C:/gowork"

    GO = "C:/Go"
}
有go文件:(C:\gowork\src\golang.org\x\mobile\example\bind\hello\hello.go)

和(MainActivity)java文件,我尝试使用函数main():


好的,我的错,如果有人在功能上有相同的问题,有人向我解释:


简言之,我尝试构建本机Go应用程序。

是否安装了gcc?我了解到它是随Go 1.5一起安装的?我以前在手机上建立过工作Hello World,所以可能是的。我可以有一个坏的信息太idk。不,gcc没有安装与围棋。程序抱怨找不到gcc。确保你有它,它在你的道路上,它是为了正确的平台。你解决了吗?如果你解决了自己的问题,以便其他用户可以找到它并投票给你。那么,你仍然有一个错误?向我们显示新的错误。我不可能是一样的。