2012年4月11日 星期三

Android JNI debugging...


1. Add debug symbols when compiling...
add "LOCAL_CFLAGS := -g" in /jni/Android.mk file -


2. Set .apk file debuggable ...
in AndroidManifest.xml, set Debuggable = true













3. In cygwin, add adb into PATH variable (if you're using windows) ...
Modify /home//.bash_profile
example:

4. Clean the project ...
1) in eclipse -
2) in cygwin, ndk-build clean

5. compile the .c files

6. In windows cmd.exe, type: "android update project -p . -s"

7. in eclipse IDE, press the debug button to start debugging ...
Debug configurations must be set properly first.
8. When the application is up and running, type ndk-gdb in cygwin shell...
You will see the following...

Reference:







沒有留言:

張貼留言