# VTK for Android

**URL:** <https://discourse.vtk.org/t/vtk-for-android/5604>\
**Category:** Development\
**Created:** [April 21, 2021, 5:04pm UTC](https://discourse.vtk.org/t/vtk-for-android/5604 "2021-04-21T17:04:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Charles](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles/32/3181_2.png) [@Charles](https://discourse.vtk.org/u/Charles)\
**Post date:** [April 21, 2021, 10:41pm UTC](https://discourse.vtk.org/t/vtk-for-android/5604/6 "2021-04-21T22:41:39Z")

</div>

Hi,

i’m the author of [the post](https://discourse.vtk.org/t/vtk-android-compilation-fails-to-find-opengl-librairies/5443) you mentioned, build VTK with recent versions of NDK is still messy but i have retried it because NDK r16b was too old to be used for my own code and others dependencies.

I found another workaround to get VTK compiled with NDK r21e but this time without backend librairies if you don’t need to render things and use only others common functions. Here is the portion of my documentation with instructions:

```
# Install VTK (8.2.0) from sources
cd ~/libs
git clone https://github.com/Kitware/VTK.git
cd VTK
git checkout v8.2.0
# Manually disable those backend modules in CMake/vtkAndroid.cmake
# -DModule_vtkInteractionStyle:BOOL=OFF
# -DModule_vtkRenderingCore:BOOL=OFF
# -DModule_vtkRenderingFreeType:BOOL=OFF
# -DModule_vtkTestingRendering:BOOL=OFF
# -DModule_vtkRenderingVolumeOpenGL2:BOOL=OFF
mkdir build && cd build
cmake .. \
-DVTK_ANDROID_BUILD=ON \
-DANDROID_NDK=$ANDROID_NDK_PATH \
-DANDROID_NATIVE_API_LEVEL=28 \ 
-DANDROID_ARCH_ABI=arm64-v8a \
-DCMAKE_BUILD_TYPE=Release
make -j8
cp -r CMakeExternals/Install/vtk-android/* $ANDROID_ARM64_V8A_INSTALL_PREFIX

```

But i don’t giving up to make thoses backend librairies found by linker with recent NDK versions.

I hope this can help you.

---

_[View the full topic](https://discourse.vtk.org/t/vtk-for-android/5604)._
