diff --git a/BUILD.md b/BUILD.md index 875a1a89f9..bebc134e33 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1046,6 +1046,17 @@ e.g. using the paths from our example Android Archive (AAR) files, which can be imported directly in Android Studio, will be generated in your_build_dir/java/build/outputs/aar, by using the above building commands with `--build_java` +To build on Windows with `--build_java` enabled you must also: + - set JAVA_HOME to the path to your JDK install + - this could be the JDK from Android Studio, or a [standalone JDK install](https://www.oracle.com/java/technologies/javase-downloads.html) + - e.g. Powershell: `$env:JAVA_HOME="C:\Program Files\Java\jdk-15"` + CMD: `set JAVA_HOME=C:\Program Files\Java\jdk-15` + - install [Gradle](https://gradle.org/install/) and add the directory to the PATH + - e.g. Powershell: `$env:PATH="$env:PATH;C:\Gradle\gradle-6.6.1\bin"` + CMD: `set PATH=%PATH%;C:\Gradle\gradle-6.6.1\bin` + - run the build from an admin window + - the Java build needs permissions to create a symlink, which requires an admin window + #### Android NNAPI Execution Provider If you want to use NNAPI Execution Provider on Android, see [NNAPI Execution Provider](/docs/execution_providers/NNAPI-ExecutionProvider.md).