gpt4 book ai didi

android - 添加 Glide v4 后的 Proguard 错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:18:53 25 4
gpt4 key购买 nike

添加 glide v4 库后,我无法生成启用了 proguard 的 apk。我在 proguard-rules 中添加了以下几行

-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}

构建时显示以下错误。

Warning:com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool: can't find referenced field 'android.graphics.Bitmap$Config HARDWARE' in library class android.graphics.Bitmap$Config

最佳答案

使用以下方法可以忽略这些警告:

-dontwarn com.bumptech.glide.load.engine.bitmap_recycle.LruBitmapPool
-dontwarn com.bumptech.glide.load.resource.bitmap.Downsampler
-dontwarn com.bumptech.glide.load.resource.bitmap.HardwareConfigState

查看此 post

关于android - 添加 Glide v4 后的 Proguard 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46232898/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com