1. Add debug symbols when compiling...
add "LOCAL_CFLAGS := -g" in /jni/Android.mk file -
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkT9BROHIl9RvZXLX39aYUf__2Hk0k3Px-O13B3Yn2rQXMdZdPq9v0pDwAaCPQgKbXVcDstocxLGopA_9-f-u9o7CYNQQAF-8Tu3hTD70epCIVFpdZ-pFJyD7zOyKO-PzQaT_vbl9Dak/s400/Picture2.png)
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 -
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmxTcix4BUmGcR4IHwGGG3ZdmjyOOhrir80q-GLsjPkaG5huJrULK9wTP1baUv-6Fsf7vz_8m6kzHfln3xfzadxKqMinhJKHvopRbBKe86tYnHXJWumJblDmNqBFBziKA2D0tYmH1BhJc/s400/Picture5.png)
5. compile the .c files
6. In windows cmd.exe, type: "android update project -p . -s"
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPrK8Wpv5rTnkL3dqo9v3s1mnZpMhXS64D3wttbTpcVjiT-A8Oo5tMJA-NsAzXbq4doVUIYMqjHjoIlVN7eODAy0FrAgFlqrqZrx3ZoE39grwsbDs3U_BbOtx36F0UmwKFRhAorkxUSec/s400/Picture7.png)
7. in eclipse IDE, press the debug button to start debugging ...
Debug configurations must be set properly first.
You will see the following...
Reference:
沒有留言:
張貼留言