Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: error: cannot find symbol class error #16835

Closed
dcu opened this issue Aug 22, 2016 · 7 comments
Closed

x/mobile: error: cannot find symbol class error #16835

dcu opened this issue Aug 22, 2016 · 7 comments

Comments

@dcu
Copy link

dcu commented Aug 22, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.7 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"
    GOPATH="/usr/local/go"
    GORACE=""
    GOROOT="/opt/go"
    GOTOOLDIR="/opt/go/pkg/tool/darwin_amd64"
    CC="clang"
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
    CXX="clang++"
    CGO_ENABLED="1"
  3. What did you do?
    Attempted to bind my SDK with gomobile bind and the current master of gomobile
  4. What did you expect to see?
    gomobile compiling successfully
  5. What did you see instead?
go/Seq.java:50: error: cannot find symbol
    private static void throwException(Universe.error err) throws Exception {
                                               ^
  symbol:   class error
  location: class Universe
go/Seq.java:54: error: cannot find symbol
    private static Universe.error wrapThrowable(final Throwable t) {
                           ^
  symbol:   class error
  location: class Universe
go/Seq.java:55: error: cannot find symbol
        return new Universe.error() {
                           ^
  symbol:   class error
  location: class Universe
3 errors

make: *** [android] Error 1

/cc @eliasnaur

@eliasnaur
Copy link
Contributor

I think you somehow have an outdated Seq.java in play. Seq.java in gomobile master doesn't have that code anymore.

@dcu
Copy link
Author

dcu commented Aug 22, 2016

how can this happen? I'm able to reproduce in 2 different computers

@eliasnaur
Copy link
Contributor

I'm not sure, and I can't reproduce the error locally either. Do you have multiple copies of Seq.java in your GOPATH?

@dcu
Copy link
Author

dcu commented Aug 22, 2016

someone vendored gomobile and that was causing the issue, thanks ! the issue is fixed now.

@dcu dcu closed this as completed Aug 22, 2016
@longtq6195-seta-international

longtran@longtran:~$ go get golang.org/x/mobile/cmd/gomobile

golang.org/x/mobile/bind

work/src/golang.org/x/mobile/bind/genjava.go:986: o.Val().ExactString undefined (type constant.Value has no field or method ExactString)
work/src/golang.org/x/mobile/bind/genobjc.go:371: o.Val().ExactString undefined (type constant.Value has no field or method ExactString)
longtran@longtran:$ gomobile install golang.org/x/mobile/example/basic
gomobile: command not found
longtran@longtran:
$ gomobile install golang.org/x/mobile/example/basic
gomobile: command not found
longtran@longtran:~$ go get golang.org/x/mobile/cmd/gomobile

golang.org/x/mobile/bind

work/src/golang.org/x/mobile/bind/genjava.go:986: o.Val().ExactString undefined (type constant.Value has no field or method ExactString)
work/src/golang.org/x/mobile/bind/genobjc.go:371: o.Val().ExactString undefined (type constant.Value has

@eliasnaur
Copy link
Contributor

eliasnaur commented Jul 3, 2017 via email

@longtq6195-seta-international

i'm using go version go1.7 linux/amd64

@golang golang locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants