-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to Build for Android on Go v1.23.1 Using anet Package #7
Comments
In order to automatically obtain the Android version number, CGO is used in the Android code. Line 3 in a79b5ca
|
Perhaps we should support manually setting the Android version without using CGO? @bobrofon |
We build android version on older version of go, without any issue on build. https://github.com/pactus-project/pactus/releases/tag/v1.4.0 Package used: |
I reproduced the same build error on go 1.22.7. It doesn't seem that the go version is relevant. |
It make sense, since I can't see |
Thanks for the quick response and for promptly fixing the issue. |
Hello, Thank you for your package.
I'm encountering a build error when attempting to compile a Go project targeting Android (GOOS=android, GOARCH=arm64) using the
anet
package. The following code reproduces the issue:Command used:
CGO_ENABLED=0 GOOS=android GOARCH=arm64 go build -ldflags "-s -w -checklinkname=0" main.go
Error:
It appears the
anet.Interfaces
function is not available during the build process. This issue might be related to how the package handles platform-specific code.Environment:
anet
(latest version)Any insights or solutions would be appreciated.
The text was updated successfully, but these errors were encountered: