如何在Android Studio上调试预构建共享库?

时间:2019-04-08 09:36:15

标签: android android-studio debugging

我使用要在Android Studio中调试的预构建共享库(在其他地方编译)来编译项目。

我试图将库源代码复制到我的Android Studio项目中,并使用它们创建断点,但是它不起作用。它找不到放置它的位置(待处理的断点)。预先构建的库经过调试调试良好,但是在其他地方。

如何在我的android studio项目中包含库源文件,并在应用程序执行期间使用它们来调试预构建库?

1 个答案:

答案 0 :(得分:0)

The prerequisite is to declare the following in your gradle file:

buildTypes {
    debug {
        minifyEnabled false
        debuggable true
    }
}

Then you need to edit your run configuration: enter image description here Select the debug type as dual and add the missing symbol directories by pressing the plus button.

Make sure that you have selected the debug Build Variant in Android Studio. Sometimes it helps if you run "Clean Project" and "Refresh Linked C++ Projects" and then make a full rebuild.