Glide版本为4.6.1版本,根据GitHub的提示设置了如下混淆规则
在混淆Android项目打包时,遇到如下Warning导致混淆失败
Warning:com.bumptech.glide.load.resource.bitmap.VideoDecoder:
can't find referenced method 'android.graphics.Bitmap
getScaledFrameAtTime(long,int,int,int)' in library
class android.media.MediaMetadataRetriever
后查阅点击打开链接得知:如果在项目compileSdkVersion <=27 时,导入Glide库混淆还需添加如下混淆规则
# glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
#glide如果你的API级别<=Android API 27 则需要添加
-dontwarn com.bumptech.glide.load.resource.bitmap.VideoDecoder