O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – compiling and deploying the hellojni sample

Let's compile and deploy the HelloJni project from command line using Ant:

  1. Open a command-line prompt (or Cygwin prompt on Windows)
  2. Go to hello-jni sample directory inside the Android NDK. All the following steps have to performed from this directory:
    $ cd $ANDROID_NDK/samples/hello-jni
    
  3. Create Ant build file and all related configuration files automatically using android command (android.bat on Windows). These files describe how to compile and package an Android application:
    android update project –p .
    
    Time for action – compiling and deploying the hellojni sample
  4. Build libhello-jni native library with ndk-build, which is a wrapper Bash script around ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required