Add doco for pre-requisites to be able to cross compile for Android on Windows with Java bindings enabled. (#5395)

This commit is contained in:
Scott McKay 2020-10-08 12:31:46 +10:00 committed by GitHub
parent 8133223871
commit 9684e1b5a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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).