Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Exception: java.lang.NoClassDefFoundError #2812

Open
hysapp opened this issue Nov 14, 2024 · 1 comment
Open

Fatal Exception: java.lang.NoClassDefFoundError #2812

hysapp opened this issue Nov 14, 2024 · 1 comment

Comments

@hysapp
Copy link

hysapp commented Nov 14, 2024

  • Fresco version: 3.4.0
  • Platform version: android 7.1.1 Galaxy J5(2016) and android6.0.1 Galaxy On5 2016

Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/graphics/ColorSpace; at com.facebook.imageutils.ImageMetaData.getColorSpace(ImageMetaData.java:12) at com.facebook.imagepipeline.image.EncodedImage.readImageMetaData(EncodedImage.java:421) at com.facebook.imagepipeline.image.EncodedImage.internalParseMetaData(EncodedImage.java:380) at com.facebook.imagepipeline.image.EncodedImage.parseMetaData(EncodedImage.java:357) at com.facebook.imagepipeline.producers.NetworkFetchProducer.notifyConsumer(NetworkFetchProducer.java:187) at com.facebook.imagepipeline.producers.NetworkFetchProducer.handleFinalResult(NetworkFetchProducer.java:167) at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:114) at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:75) at com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher$fetchWithRequest$2.onResponse(OkHttpNetworkFetcher.java:146) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

Caused by java.lang.ClassNotFoundException: Didn't find class "android.graphics.ColorSpace" on path: DexPathList[[zip file "/data/app/com.hyapp.chat.dating.messenger-1/base.apk"],nativeLibraryDirectories=[/data/app/com.hyapp.chat.dating.messenger-1/lib/arm, /data/app/com.hyapp.chat.dating.messenger-1/base.apk!/lib/armeabi-v7a, /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.imageutils.ImageMetaData.getColorSpace(ImageMetaData.java:12) at com.facebook.imagepipeline.image.EncodedImage.readImageMetaData(EncodedImage.java:421) at com.facebook.imagepipeline.image.EncodedImage.internalParseMetaData(EncodedImage.java:380) at com.facebook.imagepipeline.image.EncodedImage.parseMetaData(EncodedImage.java:357) at com.facebook.imagepipeline.producers.NetworkFetchProducer.notifyConsumer(NetworkFetchProducer.java:187) at com.facebook.imagepipeline.producers.NetworkFetchProducer.handleFinalResult(NetworkFetchProducer.java:167) at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:114) at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:75) at com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher$fetchWithRequest$2.onResponse(OkHttpNetworkFetcher.java:146) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

@Sorg666
Copy link

Sorg666 commented Nov 26, 2024

I think it is caused by proguard/r8 optimizations. In this case you can add these lines to your proguard-rules file

-keep public class com.facebook.imageutils.** {
   public *;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants