Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't debug NDK samples with Android Studio 1.3.2 on Windows

I have Android Studio 1.3.2, NDK r10e, gradle experimental plugin 0.2.0. I have cloned the ndk samples repo and carefully followed instructions for the NDK Preview, including creating a Native configuration.

When I select LLDB as the debugger and debug the Teapot NDK sample app (breakpoint in TeapotNativeActivity.cpp, line 393), the app runs, but breakpoint isn't hit as it should when I rotate the teapot. Using GDB for the debugger results in the app freezing on startup. I then have to force quit the app and press stop in the debugger window.

In both cases, debug controls appear (greyed out), and the variables window says, "Connecting", but I never see the "Waiting for Debugger" dialog on my device.

Console output using LLDB: enter image description here

Console output using GDB: enter image description here

Now, when I do the same thing from Android Studio 1.4 Preview 3, I now get the "Waiting for Debugger" dialog, but it hangs there. It looks like the debugger never connects.

Console output Android Studio 1.4: enter image description here

Is it possible to debug with AS 1.3.2 or 1.4? What do I need to do next to get it working?

like image 984
Nate Avatar asked Sep 07 '26 04:09

Nate


1 Answers

I upgraded to Android Studio 1.4 beta and the issue is fixed. I can now debug my C++ code.

like image 135
Nate Avatar answered Sep 09 '26 18:09

Nate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!