5

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.breakpoint in kotlin lldb server started

Edit build Types

Edit configuration

The breakpoint will not be hit

bigtang5
  • 277
  • 2
  • 9
  • 1
    *selects "Native only"* - try selecting `Detect automatically`. And try setting a breakpoint in Java code invoking this function and/or loading this native library. – user7860670 Mar 06 '22 at 10:57

3 Answers3

0

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

0

project("myapplication")

You can try to add project("myapplication") to cmakelist and upgrade gradle to 7.1.2.

Dharman
  • 30,962
  • 25
  • 85
  • 135
RightMore
  • 1
  • 1
0

I have the same issue in Electric Eel 2022.1.1 and the only thing that helps is to step in the jni function and then set the breakpoint on the LLDB command line in the debugger view like:

breakpoint set --file foo.cpp --line 10

Interestingly enough, afterwards I can set the breakpoint in the editor for that line as well.

r0ller
  • 1
  • 2