How to switch between lldb and GDB in Android Studio

user3326293 picture user3326293 · Sep 21, 2015 · Viewed 9.9k times · Source

While trying to debug a JNI project, I see this image after choosing "run" > "edit configuration": RunConfigurationPic According to NDK documents I should see this and be able to choose between lldb and GDB. Does anyone know how to do this on the new Android Studio? I am asking because I do not see my break points in my native code. Here is what I have: enter image description here

Answer

Sistr picture Sistr · Nov 27, 2015

Try that: Open the sdk manager (Tools->android->sdk manager) then go in the tab "SDK Tools" and there check "LLDB".

Then:

  • Make sure you have selected a native run configuration (The default one is called "app-native"
  • Make sure you have selected a "Debug" variant (Bottom left, click on variant and select a "Debug")
  • Launch in debug (not the "play" green triangle, but the small bug on its right side)

This works for me with Android Studio 2.0 Preview, Gradle 2.9 and experimental plugin 0.6.0-alpha1