Repository navigation
ci: fix Android SDK setup failing on removed tools package - #88
Merged
Merged
Conversation
Owner
Author
|
再补一处:SDK 修好后暴露出的第二个失败。 Build Xray-core from Source 在链接阶段失败: Go 1.23 起收紧了 //go:linkname 校验,而 Xray-core 的间接依赖 github.com/wlynxg/anet v0.0.5(已是该库最新版)仍 linkname 到 net.zoneCache。Xray-core 的 go.mod 要求 go 1.27,降 Go 版本不可行,因此在两处 go build 的 ldflags 中加上 -checklinkname=0。 已实跑验证:17 个步骤全部 success,产物 simplexray-apks 共 59.6 MB。 说明:该开关只跳过链接期校验,若将来 Go 真正移除 net.zoneCache,会变成 undefined 报错而不会静默产出坏二进制。 |
android-actions/setup-android@v3 defaults to packages 'tools platform-tools', but the 'tools' package has been removed from the SDK repository, so sdkmanager exits 1 and the step fails: Warning: Failed to find package 'tools' Error: The process '.../sdkmanager' failed with exit code 1 Bump to v4, whose default is only platform-tools (and runs on node24), and pin the platform/build-tools this project needs explicitly. Also bump actions/checkout and actions/setup-java to v5 to clear the "Node.js 20 is deprecated" annotations.
Go 1.23 tightened //go:linkname validation. Xray-core's indirect dependency github.com/wlynxg/anet v0.0.5 (already the newest release) still linknames net.zoneCache, so linking the android binary fails: link: github.com/wlynxg/anet: invalid reference to net.zoneCache Disable the check for these builds. Downgrading Go is not an option because Xray-core's go.mod requires go 1.27.
lhear
force-pushed
the
fix/ci-android-sdk-tools
branch
from
October 27, 2026 08:14
3b8f25d to
474ac9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Set up Android SDK 步骤直接失败:
原因
android-actions/setup-android@v3 的默认 packages 是 tools platform-tools,而 tools 包已从 Android SDK 仓库移除,sdkmanager 因此 exit 1,整步失败。
改动