This library was working fine with 1.9.0.
I updated to 2.0.0 and got this error.
I downgraded to 1.9.0 or even tested with 1.13.0. Worked fine.
So there is some issue with 2.0.0 that on this line App got crashed
Fresco.initialize(this);
For more information. I also tried these solution which didnot worked.
implementation 'com.android.support:support-compat:28.0.0'
Also adding this line in gradle.properties neither worked.
android.enableJetifier = false
with following logs output. Thanks
--------- beginning of crash
06-30 12:16:38.778 5360-5360/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.my.app, PID: 5360
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/util/Pools$SynchronizedPool;
at com.facebook.imagepipeline.platform.PlatformDecoderFactory.buildPlatformDecoder(PlatformDecoderFactory.java:34)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformDecoder(ImagePipelineFactory.java:304)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformBitmapFactory(ImagePipelineFactory.java:296)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getAnimatedFactory(ImagePipelineFactory.java:159)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getImageDecoder(ImagePipelineFactory.java:219)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerFactory(ImagePipelineFactory.java:319)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerSequenceFactory(ImagePipelineFactory.java:350)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getImagePipeline(ImagePipelineFactory.java:276)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:53)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:44)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:37)
at com.facebook.drawee.backends.pipeline.Fresco.initializeDrawee(Fresco.java:96)
at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:85)
at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:38)
at com.my.app.activities.MainActivity.onCreate(MainActivity.java:77)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.util.Pools$SynchronizedPool" on path: DexPathList[[zip file "/data/app/com.my.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.my.app-2/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.facebook.imagepipeline.platform.PlatformDecoderFactory.buildPlatformDecoder(PlatformDecoderFactory.java:34)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformDecoder(ImagePipelineFactory.java:304)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformBitmapFactory(ImagePipelineFactory.java:296)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getAnimatedFactory(ImagePipelineFactory.java:159)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getImageDecoder(ImagePipelineFactory.java:219)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerFactory(ImagePipelineFactory.java:319)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerSequenceFactory(ImagePipelineFactory.java:350)
at com.facebook.imagepipeline.core.ImagePipelineFactory.getImagePipeline(ImagePipelineFactory.java:276)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:53)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:44)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.<init>(PipelineDraweeControllerBuilderSupplier.java:37)
at com.facebook.drawee.backends.pipeline.Fresco.initializeDrawee(Fresco.java:96)
at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:85)
at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:38)
at com.my.app.activities.MainActivity.onCreate(MainActivity.java:77)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Suppressed: java.lang.ClassNotFoundException: androidx.core.util.Pools$SynchronizedPool
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 29 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Version 2.0 requires AndroidX support libraries. If your app is still using the legacy support libs, please use 1.14.2 until you've upgraded. We'll post the changelog for 2.0.0 soon.
Thanks @oprisnik. Migration to AndroidX support libraries worked. Issue resolved :)
Awesome. I'm working on the changelog, should be available soon. Sorry for that :)
The changelog is now available: https://github.com/facebook/fresco/releases/tag/v2.0.0
For non-AndroidX builds, please continue using v1.13.0
Hey Guys,
I recently migrated my fresco version from 1.9.0 to 2.0.0, my app is on android P doesn't have Android X support libraries, so i was facing the same issue, migrating to android X support libraries works like a charm, but if for some reason you can't move to Android X use v1.13.0 it works fine, i tried with v1.14.2 like @oprisnik said for some reason it didn't work for me.
Hope this will help someone :)
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.facebook.fresco:animated-gif:1.13.0'
The changelog is now available: https://github.com/facebook/fresco/releases/tag/v2.0.0
For non-AndroidX builds, please continue using v1.14.2
Using v1.14.2 still has problem
The changelog is now available: https://github.com/facebook/fresco/releases/tag/v2.0.0
For non-AndroidX builds, please continue using v1.14.2Using v1.14.2 still has problem
use v1.13.0 fixed my problem
Version 2.0 requires AndroidX support libraries. If your app is still using the legacy support libs, please use 1.14.2 until you've upgraded. We'll post the changelog for 2.0.0 soon.
I have downgrade the version to 1.14.2, but this error were still happen.
@iamsdk did you try v1.13.0 it should work, check my commented above if you already tried this just ignore https://github.com/facebook/fresco/issues/2365#issuecomment-510322092.
@iamsdk did you try v1.13.0 it should work, check my commented above if you already tried this just ignore #2365 (comment).
Yes I tried v1.13.0 and still not worked, so I merged the project to androidx, and it works good now.
@iamsdk did you try v1.13.0 it should work, check my commented above if you already tried this just ignore #2365 (comment).
Thanks for your help.
Most helpful comment
Hey Guys,
I recently migrated my fresco version from 1.9.0 to 2.0.0, my app is on android P doesn't have Android X support libraries, so i was facing the same issue, migrating to android X support libraries works like a charm, but if for some reason you can't move to Android X use v1.13.0 it works fine, i tried with v1.14.2 like @oprisnik said for some reason it didn't work for me.
Hope this will help someone :)
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.facebook.fresco:animated-gif:1.13.0'