【问题标题】:Proguard error with fresco壁画的Proguard错误
【发布时间】:2015-11-23 09:33:56
【问题描述】:

我正在使用 ProGuard,当我在发布配置中运行项目时,我收到以下错误:

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

我到处搜索,但找不到任何解决问题的线索。我已经用 fresco 文档页面中的内容更新了我的 proguard-rules.pro

Fresco 依赖:

compile 'com.facebook.fresco:fresco:0.8.1+'
compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+'

【问题讨论】:

标签: android android-gradle-plugin android-build android-proguard


【解决方案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 文件

 -dontwarn com.facebook.imagepipeline.**

这个我试过了,好像没问题!确保打开 build.gradle 文件,

android{
   ...
   buildTypes {
      ...
      release{
         ...
         minifyEnabled true
         ...
      }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-17
    • 2016-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多