When using Proguard, do you need a separate config for each referenced library?

后端 未结 2 1673
有刺的猬
有刺的猬 2021-02-06 13:37

My application has references to HoloEverywhere and SherlockActionBar, both which are in-workspace projects. When I enabled Proguard for the application only, it crashes giving

相关标签:
2条回答
  • 2021-02-06 14:29

    No you do not.

    Use these rules to keep the referenced classes un-obfuscated.

    -keep class com.actionbarsherlock.** {*;}
    -keep class org.holoeverywhere.** {*;}
    
    0 讨论(0)
  • 2021-02-06 14:39

    this also will help

    ## ActionBarSherlock 4.4.0 specific rules ##
    
    -keep class android.support.v4.app.** { *; }
    -keep interface android.support.v4.app.** { *; }
    -keep class com.actionbarsherlock.** { *; }
    -keep interface com.actionbarsherlock.** { *; }
    -keepattributes *Annotation*
    
    ## hack for Actionbarsherlock 4.4.0, see        https://github.com/JakeWharton/ActionBarSherlock/issues/1001 ##
    -dontwarn com.actionbarsherlock.internal.**
    
    0 讨论(0)
提交回复
热议问题