O'Reilly logo

Android NDK Beginner's Guide - Second Edition 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 – debugging a native Android application

  1. Create file jni/Application.mk with the following content:
    APP_PLATFORM := android-14
    APP_ABI := armeabi armeabi-v7a x86

    Tip

    These are not the only ABIs provided by the NDK; more processor architectures such as MIPS or variants such as 64 bits or hard floats exist. The ones used here are the main ones you should be concerned with. They can easily be tested on an emulator.

  2. Open Project Properties, go to C/C++ Build, uncheck Use default build command and enter ndk-build NDK_DEBUG=1:
    Time for action – debugging a native Android application
  3. In jni/com_packtpub_store_Store.cpp, place a breakpoint inside the Java_com_packtpub_store_Store_getCount()method by ...

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