简体   繁体   中英

Android Studio NDK "hello from C++" project can't debug (can't set breakpoint)?

Android Studio is BumbleBee 2021.1.1 Path 2, just new a Native C++ project, the Build menu | Edit Build Types, click debug, jni Debuggable selects "true", the Run | Edit configuration, Debugger tab, selects "Native only", in native-lib.cpp, set a breakpoint, then Run | Debug app, the breakpoint will not be hit!

I have tested these in two computers, meet the same problem. Is there anything more need to do?

Edit: If selects "Dual" in debugger tab, The breakpoint in Kotlin is OK, see pic 4. but the breakpoint in native-lib.cpp still does not be hit. kotlin中的断点 lldb 服务器启动

编辑构建类型

编辑配置

不会命中断点

Update android studio to preview release Dolphin (2021.3.1) Canary 7

project("myapplication")

You can try to add to cmakelist and upgrade gradle to 7.1.2.添加到 cmakelist 并将 gradle 升级到 7.1.2。

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