[go-nuts] Re: [gomobile] How to generate reverse-bindings for Java without the gradle-plugin?

2018-10-19 Thread timcooijmans
Thanks! Not using the packages was the issue. On Friday, October 19, 2018 at 10:10:25 AM UTC+2, Elias Naur wrote: > > You're not using the imports. To avoid generating for the entire Android > API, the reverse generator only generates bindings referenced by your code. > For examples, see

[go-nuts] Re: [gomobile] How to generate reverse-bindings for Java without the gradle-plugin?

2018-10-19 Thread Elias Naur
You're not using the imports. To avoid generating for the entire Android API, the reverse generator only generates bindings referenced by your code. For examples, see golang.org/x/mobile/bind/testdata/testpkg/javapkg. This works for me: $ gomobile bind

[go-nuts] Re: [gomobile] How to generate reverse-bindings for Java without the gradle-plugin?

2018-10-19 Thread timcooijmans
Hi, I just tried but it doesn't work: $ ls /Users/timcooijmans/Development/AndroidSDK/platforms/android-27/android.jar /Users/timcooijmans/Development/AndroidSDK/platforms/android-27/android.jar $ gomobile bind -v -bootclasspath

[go-nuts] Re: [gomobile] How to generate reverse-bindings for Java without the gradle-plugin?

2018-10-19 Thread Elias Naur
I see. For Android API, you'll need to specify the bootstrap classpath by setting the gomobile -bootclasspath flag to point to the android.jar from the Android SDK that matches your platform version. For example: $ gomobile bind -bootclasspath /platforms/android-27/android.jar If you need

[go-nuts] Re: [gomobile] How to generate reverse-bindings for Java without the gradle-plugin?

2018-10-19 Thread timcooijmans
Simple example: package test import ( "Java/android/content" "Java/android/content/pm" ) func Test() string { return "Hello world" } returns $ gomobile bind -v git.xxx.com/test type-checking package "git.xxx.com/test" failed