问题
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
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.
Fresco dependency:
compile 'com.facebook.fresco:fresco:0.8.1+'
compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+'
回答1:
Hi,According from the 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
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.**
I have tried this, and it seems be ok ! be sure you open the build.gradle file ,
android{
...
buildTypes {
...
release{
...
minifyEnabled true
...
}
}
来源:https://stackoverflow.com/questions/33867642/proguard-error-with-fresco