x/mobile: gomobile binding failed due to lack of some header file in Android NDK #39549
Comments
/cc @hyangah |
Are you building under $GOPATH? Building with go modules outside of $GOPATH might be the issue here. |
I'm building the AAR file under |
Any updates? |
Have you set |
@hajimehoshi Yes, I've set all necessary environment variables. |
I've never tried to develop Android application on Linux so I don't have a good insight. Does regular Android application development work in your environment? |
Yep, regular Android app is building correctly. |
By the way, I know the location of go/src/runtime/cgo/gcc_android.c Line 6 in 751c37f |
The similar error appears in #14398. |
I don't think we really need it but how about setting |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputAndroid NDK version:
21.3.6528147
Gomobile version:
gomobile version +4c31acb Sun Mar 29 12:56:38 2020 +0000 (android); androidSDK=
(I'm tried to use Go from Ubuntu repos, not only from Snap)
What did you do?
I'm trying to build some library which written in Go for Android (build AAR file).
The file
android/log.h
exists in Android NDK.What did you expect to see?
Library will compile successfully (it was compiled fine before).
What did you see instead?
I got the error:
The text was updated successfully, but these errors were encountered: