-
Notifications
You must be signed in to change notification settings - Fork 2.4k
BuildingForAndroid
Ilya Lavrenov edited this page Nov 12, 2020
·
8 revisions
This section describes how to build Inference Engine for Android x86 (64-bit) operating systems.
- [CMake]* 3.13 or higher
- Android NDK (this guide has been validated with r20 release)
NOTE: Building samples and demos from the Intel® Distribution of OpenVINO™ toolkit package requires CMake* 3.10 or higher.
- Download and unpack Android NDK: https://developer.android.com/ndk/downloads. Let's assume that
~/Downloads
is used as a working folder.
cd ~/Downloads
wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
unzip android-ndk-r20-linux-x86_64.zip
mv android-ndk-r20 android-ndk
- Clone submodules
cd openvino
git submodule update --init --recursive
- Create a build folder:
mkdir build
- Change working directory to
build
and runcmake
to create makefiles. Then runmake
.
cd build
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=~/Downloads/android-ndk/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM=21 \
-DANDROID_STL=c++_shared \
-DENABLE_OPENCV=OFF
make --jobs=$(nproc --all)
-
ANDROID_ABI
specifies target architecture (x86_64
) -
ANDROID_PLATFORM
- Android API version -
ANDROID_STL
specifies that shared C++ runtime is used. Copy~/Downloads/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so
from Android NDK along with built binaries
© Copyright 2018-2024, OpenVINO team
- Home
- General resources
- How to build
-
Developer documentation
- Inference Engine architecture
- CPU plugin
- GPU plugin
- HETERO plugin architecture
- Snippets
- Sample for IE C++/C/Python API
- Proxy plugin (Concept)
- Tests