壁画的Proguard错误 [英] Proguard error with fresco
问题描述
我正在使用ProGuard,并且在发布配置中运行项目时,出现以下错误:
I am using ProGuard and when I am running the project in release configuration, I get the following error:
Warning:com.facebook.imagepipeline.bitmaps.DalvikBitmapFactory: can't find referenced field 'android.graphics.Bitmap$Config BITMAP_CONFIG' in program class com.facebook.imagepipeline.nativecode.Bitmaps
我到处搜索,但找不到解决该问题的任何线索.我已经用壁画的文档页面中给出的内容更新了proguard-rules.pro
.
I searched everywhere but couldn't find any clue to solve it. I have updated my proguard-rules.pro
with what is given in the fresco's docs page.
壁画依赖性:
compile 'com.facebook.fresco:fresco:0.8.1+'
compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+'
推荐答案
根据错误
Warning:com.facebook.imagepipeline.bitmaps.DalvikBitmapFactory: can't find referenced field 'android.graphics.Bitmap$Config BITMAP_CONFIG' in program class com.facebook.imagepipeline.nativecode.Bitmaps
它显示警告com.facebook.imagepipeline.bitmaps.**等. 我的解决方案是将以下字词添加到 proguard-rules.pro 文件
It show that the warning com.facebook.imagepipeline.bitmaps.** and so on. my solution is adding the below words to the proguard-rules.pro file
-dontwarn com.facebook.imagepipeline.**
我已经尝试过了,看来还可以!确保打开 build.gradle 文件
I have tried this, and it seems be ok ! be sure you open the build.gradle file ,
android{
...
buildTypes {
...
release{
...
minifyEnabled true
...
}
}
这篇关于壁画的Proguard错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!