NoSuchFieldError

最近用Fresco框架加载GIF动态图片,遇到一个bug,记录下来,以供后来者少走弯路:

各种百度,最后参照Fresco官方文档,将原有的

fresco:1.3.0替换成0.12.0即:

在APP build.gradle里添加
dependencies {
 
  compile 'com.facebook.fresco:fresco:0.12.0'
}

如果提示与项目中v4包冲突,可以
exclude
compile('com.facebook.fresco:fresco:0.12.0') {

exclude module: 'support-v4'
}
 
// 如果需要支持 GIF 动图,需要添加
  compile 'com.facebook.fresco:animated-gif:0.12.0'

PS:0.9.0'以下的版本可以加载gif图片(本地和网络),高版本的fresco把gif的加载分离开了

 

 
 
posted @ 2017-12-25 16:12  CoddingMan  阅读(311)  评论(0编辑  收藏  举报