-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.mobileAndroid, iOS, and x/mobileAndroid, iOS, and x/mobile
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.20 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go envGOHOSTARCH="amd64"
GOHOSTOS="linux"ANDROID_NDK_HOME=/home/dpanic/development/Android/Sdk/ndk/25.2.9519653
ANDROID_HOME=/home/dpanic/development/Android/Sdk
What did you do?
Binding Go Mobile project with following command:
CGO_ENABLED=1 \
gomobile bind \
-androidapi 23 \
-target=android/$TARGET \
-ldflags="-w -s" \
-o export_$TARGET.aar \
-v
What did you expect to see?
On Go version 1.19.5 and lower this works.
What did you see instead?
unable to import bind/java: [-: # golang.org/x/mobile/bind/java
/home/dpanic/go/pkg/mod/golang.org/x/mobile@v0.0.0-20221110043201-43a038452099/bind/java
/context_android.go:9:10: fatal error: jni.h: No such file or directory
9 | //#include <jni.h>
| ^~~~~~~
compilation terminated.]
gomobile: /home/dpanic/go/bin/gobind -lang=go,java -outdir=/tmp/gomobile-work-1953076754
example.com/export failed: exit status 1
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.mobileAndroid, iOS, and x/mobileAndroid, iOS, and x/mobile