简体   繁体   中英

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: 在此输入图像描述

Console output using GDB: 在此输入图像描述

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: 在此输入图像描述

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM