Android NDK Development | Techbirds
Posted on: May 6, 2018 /
NDK Development Guide
Prerequisites:
- Install C/C++ support for eclipse ADT
- In your ADT, click help –> Install new software –> –> from “Programmin Languages” –> select CDT Development tools.
- Click install.
- Install Cygwin (if you are working on windows).
- Download cygwin from https://cygwin.com/ and do install the “make” tool
- Download NDK from developers.google.com
- Define environment variables
- NDK_HOME: to ndk extract directory
- CYGWIN_HOME: to cygwin installed directory
- CYGWIN: nodosfilewarning
Steps for creating project for android NDK.
- Place your native sources under /jni/…
- Create /jni/Android.mk to describe your native sources to the NDK build system
- Optional: Create /jni/Application.mk.
- Build your native code by running the ‘ndk-build’ script from your project’s directory. It is located in the top-level NDK directory
- cd
- /ndk-build
- The build tools copy the stripped, shared libraries needed by your application to the proper location in the application’s project directory.
- Finally, compile your application using the SDK tools in the usual way. The SDK build tools will package the shared libraries in the application’s deployable .apk file
To build a header file use following command:
javah –jni -classpath ../../bin/classes;”C:\Program Files\Android\android-sdk\platforms\android-17\android.jar” -o < “.class” classFilename>
Reference : android-beginners-ndk-setup-step-by-step
Linchpin Technologies Pvt Ltd, a mobile app development company India , is globally recognized as enterprise app development company
1,106 total views, 1 views today
Share this On Tags: Android NDK, Cygwin, native development android