title: Unable to build OpenNI 2.2 for Android
body: <p>I am trying to interface ASUS Xtion PRO LIVE Depth sensor with my smartphone. For that, I need OpenNI shared libraries for Android. I am using cygwin on Windows and I followed <a href="https://github.com/occipital/OpenNI2" rel="nofollow">these steps:</a> </p>
  
  <ol>
  <li>Download NDK</li>
  <li>defind NDK_ROOT path</li>
  <li>run ReleaseVersion.py</li>
  </ol>
  
  <p>But I am stuck on 3rd Step:</p>
  
  <pre><code>Creating installer for OpenNI 2.2 android
  make: Entering directory '/home/OF/structure/OpenNI2_modified/Packaging/AndroidBuild'
  Cygwin         : Generating dependency file converter script
  StaticLibrary  : libstdc++.a
  Compile++ thumb  : EventBasedRead &lt;= main.cpp
  Compile++ thumb  : OpenNI2 &lt;= OpenNI.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniStream.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniSensor.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniDeviceDriver.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniDevice.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniDataRecords.cpp
  Compile++ thumb  : OpenNI2 &lt;= OniRecorder.cpp
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OpenNI.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniDataRecords.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniDeviceDriver.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniDevice.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniStream.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Samples/EventBasedRead/main.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniSensor.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniDataRecords.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniDataRecords.o] Error 1
  make: *** Waiting for unfinished jobs....
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OpenNI.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OpenNI.o] Error 1
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniDeviceDriver.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniDeviceDriver.o] Error 1
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniDevice.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniDevice.o] Error 1
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniSensor.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniSensor.o] Error 1
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/EventBasedRead/main.o' failed
  make: *** [obj/local/armeabi-v7a/objs/EventBasedRead/main.o] Error 1
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniStream.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniStream.o] Error 1
  arm-linux-androideabi-g++.exe: error: jni/OpenNI2/Source/Core/OniRecorder.cpp: No such file or directory
  arm-linux-androideabi-g++.exe: fatal error: no input files
  compilation terminated.
  /cygdrive/c/Android/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target 'obj/local/armeabi-v7a/objs/OpenNI2/OniRecorder.o' failed
  make: *** [obj/local/armeabi-v7a/objs/OpenNI2/OniRecorder.o] Error 1
  make: Leaving directory '/home/OF/structure/OpenNI2_modified/Packaging/AndroidBuild'
  Build failed!
  </code></pre>
  
  <p>EDIT: ----------------------------------------------------------------------</p>
  
  <p>I was able to build OpenNI2 for Android in Mac OSX. I have uploaded <code>OpenNI-android-2.2.tar</code> shared library, and ini files present in <code>Final</code> folder after successful build, in case if anyone else might want them:
  <a href="http://1drv.ms/1PbYhhW" rel="nofollow">http://1drv.ms/1PbYhhW</a></p>