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 – debugging DroidBlaster

Let's enable debugging mode in our application first:

  1. The first important thing to do but really easy to forget is to activate the debugging flag in your Android project. This is done in the application manifest AndroidManifest.xml. Do not forget to use the appropriate SDK version for native code:
    <?xml version="1.0" encoding="utf-8"?> 
    <manifest ...> 
        <uses-sdk android:minSdkVersion="10"/> 
        <application ... 
                     android:debuggable="true">
            ...
  2. Enabling debug flag in manifest automatically activates debug mode in native code. However, APP_OPTIM flag also controls debug mode. If it has been manually set in Android.mk, then check that its value is set to debug (and not release) or simply remove it:
    APP_OPTIM := debug ...

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