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 ... 
  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 ...

Get Android NDK Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.