How to get release build apk file using proguard

后端 未结 2 849
轻奢々
轻奢々 2020-11-27 08:33

I am trying to use ProGuard to make release apk file for my project, Apparently I am using many third party libraries, Where I need to use only few classes from them, I woul

相关标签:
2条回答
  • 2020-11-27 08:52

    add this:

    -dontwarn com.squareup.okhttp.**
    

    to your proguard-rules.pro

    0 讨论(0)
  • 2020-11-27 08:59

    You have to write pro-guard rule for every library else pro-guard will obfuscate it

    This is for Admob

     -keep public class com.google.ads.**{
           public *;
        }
    

    This is for V7 support lib

    -dontwarn android.support.v7.**
    -keep class android.support.v7.** { *; }
    -keep interface android.support.v7.** { *; }
    
    0 讨论(0)
提交回复
热议问题