[vtkusers] Building VTK for Android

Alexander Novinskiy alexander.novinskiy at gmail.com
Thu Apr 13 08:39:18 EDT 2017


I managed to solved the problem as follows:

I downloaded android command line tools from the official Android Studio web site as an archive.

The archive should be extracted into a folder “tools” which should be placed into android sdk directory.

The android sdk directory will probably already contain a folder “tools”.

One should substitute the default android sdk “tools” with the android command line tools downloaded as a standalone package.

The reason for this is that “tools/android” tool is deprecated in modern Android Studio distributions and doesn’t work as it used to.

I guess this issue should be considered by developers of VTK in order to ged rid of difficulties on the user side since Google doesn’t distribute proper android command line tools with Android Studio any more.
> On 12. Apr 2017, at 16:21, Alexander Novinskiy <alexander.novinskiy at gmail.com> wrote:
> 
> Dear VTK users ,
> 
> When building VTK v7.1 on my Mac if came across the following problem.
> 
> On the configuration phase I chose building for Android and pointed out the location of the “android” tool as was demanded during the VTK build configuration process.
> 
> When ran “make” command my VTK build failed on building NativeVTK with the following message:
> 
> Scanning dependencies of target NativeVTK
> [100%] Building CXX object Examples/Android/NativeVTK/jni/CMakeFiles/NativeVTK.dir/main.cxx.o
> [100%] Building C object Examples/Android/NativeVTK/jni/CMakeFiles/NativeVTK.dir/Users/alex/Library/Android/sdk/ndk-bundle/sources/android/native_app_glue/android_native_app_glue.c.o
> [100%] Linking CXX shared library ../libs/armeabi/libNativeVTK.so
> [100%] Built target NativeVTK
> Scanning dependencies of target NativeVTK-ant-configure
> *************************************************************************
> The "android" command is deprecated.
> For manual SDK, AVD, and project management, please use Android Studio.
> For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
> *************************************************************************
> Invalid or unsupported command "update project --name NativeVTK --path /Users/alex/Development/GameDev/KitWare/VTK/Examples/Android/NativeVTK --target android-21"
> 
> Supported commands are:
> android list target
> android list avd
> android list device
> android create avd
> android move avd
> android delete avd
> android list sdk
> android update sdk
> make[5]: *** [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure] Error 2
> make[4]: *** [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/all] Error 2
> make[3]: *** [all] Error 2
> make[2]: *** [CMakeExternals/Prefix/vtk-android-21-armeabi/src/vtk-android-stamp/vtk-android-build] Error 2
> make[1]: *** [CMakeFiles/vtk-android.dir/all] Error 2
> make: *** [all] Error 2
> 
> 
> Can anyone give me a hint about getting around this problem?
> 
> With kind regards,
> 
> Alexander Novinskiy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170413/5e8c5280/attachment.html>


More information about the vtkusers mailing list