Android混淆、优化包大小 记录

1.不混淆类内的接口

-keep public class com.daps.weather.notification.DapWeatherNotification {
  *;
}

-keep class com.daps.weather.notification.DapWeatherNotification$WeatherNotificationListener { *; }
 
 
-keepattributes nnerClasses

文章出处:https://blog.csdn.net/pangzaifei/article/details/70213731

2.优化apk大小,删除log

-assumenosideeffects class com.daps.weather.base.LogHelper {
    public static *** d(...);
    public static *** v(...);
    public static *** i(...);
}
#-dontoptimize
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg'

猜你喜欢

转载自blog.csdn.net/pangzaifei/article/details/76153903