I am reading Android Native Development Kit Cookbook. And there are sample codes in each chapter. Current chapter is dedicated to Debugging an Android NDK application with
NDK GDB. But I have problems with it. The cookbook requires that AndroidManifest.xml has the android:debuggable attribute of the <application>element set to true. But when I set it true or false Eclipse complains with an error. I have read that android:debuggable=true is not mandatory, you can just do ndk-build NDK_DEBUG=1 and app will be debuggable. So I have omitted setting debuggable flag in Manifest and just build the app. Then deployed the app on device run it and called ndk-gdb from terminal. But I got this message:
$ ndk-gdb
ERROR: Package cookbook.chapter3 is not debuggable ! You can fix that in two ways:
Rebuilt with the NDK_DEBUG=1 option when calling 'ndk-build'.
Modify your manifest to set android:debuggable attribute to "true",
then rebuild normally.
How to overcome this problems (the flag in manifest and achieve debugging)? Please help me to debug my test project. I am just learning.