> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.