for me running the following package reverse
import ( "Java/android/databinding/DataBindingUtil" "Java/android/os" sapp "Java/android/support/v7/app" rlayout "Java/go/reverse/R/layout" "Java/go/reverse/databinding/ActivityMainBinding" "fmt" ) type MainActivity struct { sapp.AppCompatActivity } func (a *MainActivity) OnCreate1(this app.AppCompatActivity, b os.Bundle) { this.Super().OnCreate1(b) db := DataBindingUtil.SetContentView2(this, rlayout.Activity_main) mainBind := ActivityMainBinding.Cast(db) mainBind.SetAct(this) } func (a *MainActivity) GetLabel() string { return "Hello from Go!" } produces :gobindDebug unsupported basic type: invalid type unsupported basic type: invalid type unsupported basic type: invalid type FAILED :buildInfoGeneratorDebug FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':gobindDebug'. > Process 'command '/home/kingwill101/go/bin/gobind'' finished with non-zero exit value 1 * Try:Enter code here... On Sunday, 25 December 2016 05:15:44 UTC-5, Elias Naur 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/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.