I am attaching a simple reproduction of the package name crash (using reverse.go). There is no need to modify the android manifest file for this to trigger. The error I see is given below.
I'm also attaching a proposed fix for the renaming clash which works for my case. I can submit it as a CL or you can do it if you'd prefer as it would be probably faster (I've signed the CLA in the past, no issue there). without the proposed fix: /Users/aam/bin/gomobile: go build -pkgdir=/Users/aam/pkg/gomobile/pkg_android_amd64 -tags="" -i -buildmode=c-shared -o=/var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/android/src/main/jniLibs/x86_64/libgojni.so /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/androidlib/main.go failed: exit status 2 # _/var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:20: app redeclared as imported package name previous declaration at /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:17 /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:96: undefined: "Java/android/support/v7/app".Service /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:100: undefined: "Java/android/support/v7/app".Service /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:144: undefined: "Java/android/support/v7/app".Service /var/folders/sp/06p28g2d0vs7gd2vhf26wl9m0000gn/T/gomobile-work-174727778/gomobile_bind/go_reversemain.go:148: undefined: "Java/android/support/v7/app".Service With the fix the project builds successfully (and, in my original code, the service is started after correctly defining it in the manifest). -- 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.
reverse.go
Description: Binary data
fix-name-clash.patch
Description: Binary data