From 045a8af07a17f1ddade566f1298572ba682437d1 Mon Sep 17 00:00:00 2001 From: "Mengtao (Martin) Yuan" Date: Sat, 17 May 2025 10:32:50 -0700 Subject: [PATCH] Fix doc for Android build error in xnnpack_README.md In scripts/build_android_library.sh, there's ``` ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew build ``` If ANDROID_SDK is not set, ANDROID_HOME will be /opt/android/sdk, which is wrong for Mac. Add `export ANDROID_SDK` instruction to avoid the build error if users have not exported it. --- .../demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md index 7f1ee6df374..7026b84697e 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md @@ -183,6 +183,7 @@ If you need to use other dependencies (like tokenizer), please build from the lo ### Alternative 2: Command line Without Android Studio UI, we can run gradle directly to build the app. We need to set up the Android SDK path and invoke gradle. ``` +export ANDROID_SDK= export ANDROID_HOME= pushd examples/demo-apps/android/LlamaDemo ./gradlew :app:installDebug