英文:
`gomobile build` and `gomobile install` throws "gomobile: EOF"
问题
我正在尝试使用gomobile构建一个Android应用程序,但是gomobile install
和gomobile 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
but it was fixed with
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
.
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论