Android Studio's debugger not stopping at breakpoints within library modules

前端 未结 7 1291
难免孤独
难免孤独 2020-12-03 00:27

At the moment I\'m developing an Android app that is based on third party code. I started to set breakpoints for understanding the code and soon ran into a problem. Suddenly

相关标签:
7条回答
  • 2020-12-03 01:13

    in addition to olik79's answer, I would like to add that , these two lines will make your app hit to breakpoints in fragments. otherwise it may baypass fragments

    -keep public class * extends android.support.v4.** {*;}
    -keep public class * extends android.app.Fragment
    

    here is my complete edit on proguard-android.txt in sdk\tools\proguard

    # The support library contains references to newer platform versions.
    # Don't warn about those in case this app is linking against an older
    # platform version.  We know about them, and they are safe.
    -dontwarn android.support.**
    
    -keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
    -ignorewarnings
    -renamesourcefileattribute SourceFile
    -keepattributes SourceFile,LineNumberTable
    
    -keep public class * extends android.support.v4.** {*;}
    -keep public class * extends android.app.Fragment
    
    0 讨论(0)
提交回复
热议问题