Well, the fix to gobind was simple, just add GOROOT to the env of cmds 
being execued
https://github.com/dballard/mobile/commit/ff01053d86dfbd6f8699e82b06e762c14ea269bd
Tho actually contributing it back seems like a chore, signing up to the 
golang entierly specific workflow. So maybe that'll be a job for anotehr 
day :/

Now however I am getting a gomobile failire

:app:gomobileDebug
/home/user/src/go/bin/gomobile: loadExportData failed go install -pkgdir=
/home/user/src/go/pkg/gomobile/pkg_android_arm -gcflags=-shared 
-ldflags=-shared 
github.com/dballard/go-ricochet-mobile failed: exit status 1
../../../src/go/src/github.com/dballard/go-ricochet-mobile/InitActivity.go:
12:2: cannot find package "Java/RicochetMobile/ActivityInitBinding" in any 
of:
    /home/user/go/src/Java/RicochetMobile/ActivityInitBinding (from $GOROOT)
    /tmp/gomobile-work-829567560/gen/src/Java/RicochetMobile/
ActivityInitBinding (from $GOPATH)
    /home/user/src/go/src/Java/RicochetMobile/ActivityInitBinding
../../../src/go/src/github.com/dballard/go-ricochet-mobile/InitActivity.go:
10:2: cannot find package "Java/RicochetMobile/R/layout" in any of:
    /home/user/go/src/Java/RicochetMobile/R/layout (from $GOROOT)
    /tmp/gomobile-work-829567560/gen/src/Java/RicochetMobile/R/layout (from 
$GOPATH)
    /home/user/src/go/src/Java/RicochetMobile/R/layout
../../../src/go/src/github.com/dballard/go-ricochet-mobile/InitActivity.go:6
:2: cannot find package "Java/android/databinding/DataBindingUtil" in any of
:
    /home/user/go/src/Java/android/databinding/DataBindingUtil (from $GOROOT
)
    /tmp/gomobile-work-829567560/gen/src/Java/android/databinding/
DataBindingUtil (from $GOPATH)
    /home/user/src/go/src/Java/android/databinding/DataBindingUtil
../../../src/go/src/github.com/dballard/go-ricochet-mobile/InitActivity.go:7
:2: cannot find package "Java/android/os" in any of:
    /home/user/go/src/Java/android/os (from $GOROOT)
    /tmp/gomobile-work-829567560/gen/src/Java/android/os (from $GOPATH)
    /home/user/src/go/src/Java/android/os


 FAILED

FAILURE: Build failed with an exception.

It seems like half the imports I would expect to be there are not
Any ideas?

the ones that worked were:
    "Java/android/support/v7/app"
    gopkg "Java/RicochetMobile"
    "Java/RicochetMobile/databinding"



On Saturday, June 24, 2017 at 7:05:50 AM UTC-7, Dan Ballard wrote:
>
> I am working on creating an android app entirely in go using the Java og 
> bindings, as outlined in
> https://github.com/golang/mobile/tree/master/example/reverse
>
> I created a go project under my goroot and an android project in my 
> ~/AndroidStuioProjects
> I seem to have the configs right but I seem to have run into a problem
>
> :app:gobindDebug
> 2017/06/23 18:10:03 failed to go install the generated Java wrappers: exit 
> status 2: go: cannot find GOROOT directory: /usr/local/go
>
>  FAILED
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':app:gobindDebug'.
> > Process 'command '/home/user/src/go/bin/gobind'' finished with non-zero 
> exit value 1
>
>
>
> Which as far as I can tell if caused by
> https://github.com/golang/go/issues/18209 [x/mobile: gobind ignores 
> $GOROOT]
>
>
> The only options I see are 
> 1) put in a very hacky symlink
> 2) actually look at solving the bug
>
> Anyone else see an option I'm missing?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to