`gomobile build`和`gomobile install`抛出“gomobile: EOF”错误。

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

`gomobile build` and `gomobile install` throws "gomobile: EOF"

问题

我正在尝试使用gomobile构建一个Android应用程序,但是gomobile installgomobile build命令失败并显示gomobile: EOF错误。在出现这个错误之前,我遇到了以下错误:

# golang.org/x/mobile/gl In file included from /root/go/src/golang.org/x/mobile/gl/gl.go:17:0: work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory compilation terminated.

但是通过执行yum install make gcc mesa-libGLES-devel mesa-libEGL-devel命令,这个错误得到了解决。

这个应用程序主要是一个网络应用程序。以下是导入的包。只有特定的包能与gomobile一起使用吗,还是所有的包都可以?

"golang.org/x/mobile/app"
"golang.org/x/net/websocket"
"os/exec"
"flag"
"fmt"
log "github.com/golang/glog"
"io/ioutil"
"net"
"net/http"
"net/url"
"strconv"

操作系统:Fedora 22。

更多信息:我能够构建https://github.com/golang/mobile/blob/master/example/network/main.go,所以我只能假设问题是特定于我的应用程序。

英文:

I'm trying to build an android application using gomobile but the commands gomobile install and gomobile build fail with gomobile: EOF . Before this error I was getting this error:

# golang.org/x/mobile/gl
In file included from /root/go/src/golang.org/x/mobile/gl/gl.go:17:0:
work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.
but it was fixed with yum install make gcc mesa-libGLES-devel mesa-libEGL-devel.

The application is mostly a networking application. Here are the imports. Do only certain packages work with gomobile or all of them?

"golang.org/x/mobile/app"
"golang.org/x/net/websocket"
"os/exec"
"flag"
"fmt"
log "github.com/golang/glog"
"io/ioutil"
"net"
"net/http"
"net/url"
"strconv"

OS: Fedora 22.

More info: I'm able to build https://github.com/golang/mobile/blob/master/example/network/main.go so I can only assume the issue is specific to my application.

答案1

得分: 1

它失败了,因为AndroidManifest.xml文件是空的。

英文:

It failed because AndroidManifest.xml was empty.

huangapple
  • 本文由 发表于 2015年8月9日 21:11:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/31904586.html
匿名

发表评论

匿名网友

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

确定