12-25 09:52:45.244 10998 10998 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)
go version devel +5bfba30 Sat Dec 24 22:37:11 2016 +0000 darwin/amd64 my gomobile version is as of last night, last commit: commit 6a96d4c7cfa48b88f4239efd650b525de7617dc5 my android version is 6.0.1 I'm trying to resolve the double-import issue in gobind via renaming in gogen.go. extracting an example will take some time but i'll have one tomorrow, i hope. On Sun, Dec 25, 2016 at 3:15 AM, Elias Naur <elias.n...@gmail.com> wrote: > Hi, > > Can I persuade you to send a complete example that demonstrates the > package name clash problem and one that demonstrates the runtime JNI crash? > Thanks. > > - elias > > > On Saturday, December 24, 2016 at 11:27:56 PM UTC+1, andrey mirtchovski > 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/i >> ssues/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. > -- 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.