> app redeclared as imported package name 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.
> 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. > undefined: "Java/android/support/v7/app".Service `Service` is under the standard android.app package, not the support lib. This actually comes full circle to the first error "app redeclared as imported package name". Double check all source files. On Sat, Dec 24, 2016 at 11:27 AM andrey mirtchovski <mirtchov...@gmail.com> wrote: > > I haven't used these bindings but wouldn't you rename the v7 import as > > > > sapp "Java/android/support/v7/app" > > > > and then import > > > > "Java/android/app" > > > > > I'm still struggling with this. In my case I need v7.app as well as > android.app and android.app.Service, so my imports are (as per your > suggestion): > > imort ( > ... > "Java/android/app" > "Java/android/app/Service" > sapp "Java/android/support/v7/app" > ... > ) > > but during the build stage I get this error: > > # > _/var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:20: > app redeclared as imported package name > previous declaration at > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:17 > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:31: > undefined: "Java/android/support/v7/app".Service > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:35: > undefined: "Java/android/support/v7/app".Service > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:79: > undefined: "Java/android/support/v7/app".Service > /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-395962016/gomobile_bind/go_main.go:83: > undefined: "Java/android/support/v7/app".Service > > > as far as the current poster's issue, i started looking at it briefly. in > OnCreate1 I added the following: > > > context := this.GetApplicationContext() > > // there are two constructors, one with (Context) and one with > (Context, int) > builder := Builder.New1(context) > > // there is setMessage(int) and setMessage(CharSequence) > builder.SetMessage_Ljava_lang_CharSequence_2("Dialog test from go") > > this compiles fine, but I get the following error at runtime: > > 12-24 10:03:46.407 6969 6969 E art : JNI ERROR (app bug): attempt to > pass an instance of go.Seq$Ref as argument 1 to void > android.app.AlertDialog$Builder.<init>(android.content.Context) > -- 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.