From 9b6449dcf4ead36f3aefacc76a75dc8c7ec9c320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 2 Feb 2023 16:30:50 +0800 Subject: [PATCH] Fix find NDK on macOS --- cmd/internal/build/sdk.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/internal/build/sdk.go b/cmd/internal/build/sdk.go index aaa5cb8a..e5468c98 100644 --- a/cmd/internal/build/sdk.go +++ b/cmd/internal/build/sdk.go @@ -3,6 +3,7 @@ package main import ( "os" "path/filepath" + "runtime" "sort" "strconv" "strings" @@ -42,7 +43,7 @@ func findSDK() { os.Setenv("ANDROID_SDK_HOME", androidSDKPath) os.Setenv("ANDROID_NDK_HOME", androidNDKPath) os.Setenv("NDK", androidNDKPath) - os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", "linux-x86_64", "bin")) + os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", runtime.GOOS+"-x86_64", "bin")) } func findNDK() bool {