From 16da9abfd651a64a2eb6e183205811c7c8c66bfb Mon Sep 17 00:00:00 2001 From: robotchaoX Date: Tue, 18 Apr 2023 11:27:19 +0800 Subject: [PATCH] Update BUILD.md for building on Android --- BUILD.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.md b/BUILD.md index ff2456d3..6be82957 100644 --- a/BUILD.md +++ b/BUILD.md @@ -23,7 +23,11 @@ Use the provided CMakeLists.txt with [CMake](https://cmake.org) to generate a bu Building on Android is done using the [Gradle Build Tool](https://gradle.org/): +Set Android SDK/NDK by environment variable `ANDROID_SDK_ROOT`/`ANDROID_NDK_HOME`. + ``` +export ANDROID_SDK_ROOT= +export ANDROID_NDK_HOME= cd android ./gradlew assembleDebug ``` @@ -33,6 +37,8 @@ On Windows execute `gradlew.bat assembleDebug`. If you want to build and install on a connected device or emulator image, run ```gradle installDebug``` instead. +If you want to build it through [Android Studio](https://developer.android.com/studio), open project ```android\build.gradle``` in Android Studio. + ## [iOS and macOS](xcode/) Building for *iOS* and *macOS* is done using the [examples](xcode/examples.xcodeproj) *Xcode* project found in the [xcode](xcode) directory. These examples use the [**MoltenVK**](https://moltengl.com/moltenvk) Vulkan driver to provide Vulkan support on *iOS* and *macOS*, and require an *iOS* or *macOS* device that supports *Metal*. Please see the [MoltenVK Examples readme](xcode/README_MoltenVK_Examples.md) for more info on acquiring **MoltenVK** and building and deploying the examples on *iOS* and *macOS*.