[vtk-developers] VTK Android and integration with Android Studio

Ben Boeckel ben.boeckel at kitware.com
Wed Oct 14 10:19:51 EDT 2015


On Wed, Oct 14, 2015 at 03:57:04 -0700, Lonni Besançon wrote:
> So I've been trying to play a little with VTK for android and it seems to
> work just fine. However, it does not integrate very well with previous
> developments and recent developments I have made. Indeed, android
> development has been moving towards gradle and Android Studio since a few
> months/years. 
> 
> Therefore I was wondering if there was any known way to integrate/combine
> VTK development with android studio and gradle. I've seen a post on kitware
> with someone doing it for VES, but since VES is now "deprecated" having a
> solution for "VTK for Android" would be great.
> 
> Maybe there's a workaround like including the gradle script into the
> makefiles or the other way around. Anyway would love to get some feedback
> from those of you who have tried some things with android and vtk.

It isn't directly useful, but I have a separate project which use CMake
to run ant for the older-style Android builds here:

    https://github.com/mathstuf/abagames-gunroar/tree/master/src/android

It basically adds a build step to install the library into jni/ so that
the NDK can pick it up and then runs the ndk-build and ant commands to
build the code and APK.

Adapting it to do something similar for gradle shouldn't be too hard.

--Ben


More information about the vtk-developers mailing list