简体   繁体   English

无法在Windows上使用Android Studio 1.3.2调试NDK示例

[英]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. 我有Android Studio 1.3.2,NDK r10e,gradle实验插件0.2.0。 I have cloned the ndk samples repo and carefully followed instructions for the NDK Preview , including creating a Native configuration. 我已经克隆了ndk样本repo,并仔细遵循NDK Preview的说明 ,包括创建Native配置。

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. 当我选择LLDB作为调试器并调试Teapot NDK示例应用程序(TeapotNativeActivity.cpp中的断点,第393行)时,应用程序会运行,但是当我旋转茶壶时,断点不会被击中。 Using GDB for the debugger results in the app freezing on startup. 将GDB用于调试器会导致应用程序在启动时冻结。 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: 使用LLDB的控制台输出: 在此输入图像描述

Console output using GDB: 使用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. 现在,当我从Android Studio 1.4 Preview 3中做同样的事情时,我现在得到了“Waiting for Debugger”对话框,但它挂起了。 It looks like the debugger never connects. 看起来调试器永远不会连接。

Console output Android Studio 1.4: 控制台输出Android Studio 1.4: 在此输入图像描述

Is it possible to debug with AS 1.3.2 or 1.4? 是否可以使用AS 1.3.2或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. 我已升级到Android Studio 1.4测试版,问题已解决。 I can now debug my C++ code. 我现在可以调试我的C ++代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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