How to debug android library module in Android Studio?

后端 未结 4 1833
离开以前
离开以前 2021-02-08 03:48

I have an Android Studio project which contains a library module, which is added as another gradle project to it. I would like to debug the library code and set breakpoints on i

4条回答
  •  攒了一身酷
    2021-02-08 04:12

    After a few days struggling I found the right configuration for being able to debug the library module :

    1- Create a project which consists of two modules, the app and the library-module

    2- Add direct module dependency to app , from the library-module. This is what the app's build.gradle :

    compile project(':library-module')
    

    3- Remove any automatic signing configuration added in the app build.gradle

    4- Remove these lines from both the app and library-module

    minifyEnabled true
    shrinkResources true
    

提交回复
热议问题