You're right, I failed to consider the constants on Service. I thought I saw something about this recently but it just turned out to be you five days ago :)
On Sat, Dec 24, 2016 at 4:27 PM andrey mirtchovski <mirtchov...@gmail.com> wrote: > Apologies for the digression. > > > This suggests that you still have multiple `app` imports without each > having a unique name. Double check your imports in all source files being > compiled. > > > I have renamed both imports to something else and ensured there is nothing > importing or using "app", however gomobile generates a gomain_bind.go file > that doesn't take into account the renames: > > ---- > // File is generated by gobind. Do not edit. > package gomobile_bind > > /* > #include <stdlib.h> > #include <stdint.h> > #include "seq.h" > #include "myapp.h" > > */ > import "C" > > import ( > "Java/android/app" > "Java/android/content" > "Java/android/os" > "Java/android/support/v7/app" > "myapp" > _seq "golang.org/x/mobile/bind/seq" > ) > ---- > > I think i'll poke around gomobile to try and make > > > > import "Java/android/app/Service" > > I'd imagine `Service` is not a package and not something you can import. > You'd simply access it (whatever *it* is in the bindings) from the `app` > import. > > > I refer you to the section titled "Importing Java Classes and Interfaces > from Go" which describes the use of static methods and constants via the > aforementioned import of an inner class: > https://github.com/golang/go/issues/16876 > -- 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.