Skip to content

Commit d070a2f

Browse files
abueideclaude
andcommitted
fix(android): capture only stdout from nix build to fix SDK resolution on Linux
On Linux CI, Nix outputs warnings to stderr (e.g., "warning: Git tree is dirty"). Using 2>&1 mixed these warnings into the captured path, causing the directory check to fail and ANDROID_SDK_ROOT to stay empty. Changed to 2>/dev/null so only the stdout store path is captured. Also replaced android.sh build references in examples/android/devbox.json with native gradle commands since android.sh build was removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a29978e commit d070a2f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/android/devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"shell": {
1212
"scripts": {
1313
"build": [
14-
"android.sh build"
14+
"gradle assembleDebug"
1515
],
1616
"build:release": [
17-
"android.sh build --config Release"
17+
"gradle assembleRelease"
1818
],
1919
"start:app": [
2020
"android.sh run ${1:-${ANDROID_DEFAULT_DEVICE:-max}}"

plugins/android/virtenv/scripts/platform/core.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ resolve_flake_sdk_root() {
104104
[ -n "${ANDROID_DEBUG_SETUP:-}" ] && echo "[CORE-$$] Building SDK: path:${root}#${output}" >&2
105105
sdk_out=$(
106106
nix --extra-experimental-features 'nix-command flakes' \
107-
build "path:${root}#${output}" --no-link --print-out-paths 2>&1 || true
107+
build "path:${root}#${output}" --no-link --print-out-paths 2>/dev/null || true
108108
)
109109
[ -n "${ANDROID_DEBUG_SETUP:-}" ] && echo "[CORE-$$] nix build returned: ${sdk_out:-(empty)}" >&2
110110

0 commit comments

Comments
 (0)