I found this after turning on verbose logging:
04-26 09:38:14.129 354-8610/com.bridj.rider W/unknown:RequestLoggingListener: time 2585133: onProducerFinishWithFailure: {requestId: 0, stage: DecodeProducer, elapsedTime: 5 ms, extraMap: {hasGoodQuality=true, queueTime=1, imageType=DEFAULT, isFinal=true}, throwable: java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.imagepipeline.g.c com.facebook.imagepipeline.animated.factory.f.a(com.facebook.imagepipeline.g.e, com.facebook.imagepipeline.c.a, android.graphics.Bitmap$Config)' on a null object reference}
04-26 09:38:14.129 354-8610/com.bridj.rider W/unknown:RequestLoggingListener: time 2585133: onRequestFailure: {requestId: 0, elapsedTime: 43 ms, throwable: java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.imagepipeline.g.c com.facebook.imagepipeline.animated.factory.f.a(com.facebook.imagepipeline.g.e, com.facebook.imagepipeline.c.a, android.graphics.Bitmap$Config)' on a null object reference}
I am attempting to download and display an animated gif.
I am using the progaurd config documented here:
http://frescolib.org/docs/proguard.html
Is that still correct?
Everything seems to work ok with a debug build.
I was able to workaround it by adding this rule:
-keep class com.facebook.imagepipeline.animated.factory.** { *; }
This is obviously not a good solution but I think it shows proguard is the problem.
Maybe some do not strip annotations are missing from the animated gif packages?
Hi @ndurell,
the @NotStrip annotation should be on all the classes whose instance are created with reflection. The annotation should be there but I'll double check.
Thanks
If it helps I made a sample repo that demonstrates the error:
https://github.com/ndurell/FrescoAnimatedGif
The project is set to run proguard automatically for the debug build. If you turn minifyEnabled off you can see that it works fine.
NOTE: It seems like with instant run on I got some inconsistent behavior. I think this is becase it didn't minify things.
@ndurell ur solution really works.thx
I face this error when try to display animate went.
I believe this got fixed with https://github.com/facebook/fresco/commit/0d0c5757ff40eb9e9f23533c9798dcdde095ce86.
Most helpful comment
I was able to workaround it by adding this rule:
-keep class com.facebook.imagepipeline.animated.factory.** { *; }
This is obviously not a good solution but I think it shows proguard is the problem.
Maybe some do not strip annotations are missing from the animated gif packages?