ClassNotFoundException: Didn't find class "java.util.function.Supplier"
Version 5.0.4:
Caused by java.lang.ClassNotFoundException: Didn't find class "java.util.function.Supplier" on path: DexPathList[[zip file "/data/app/messages.chat.free.text.messaging.sms-1/base.apk"],nativeLibraryDirectories=[/data/app/messages.chat.free.text.messaging.sms-1/lib/arm64, /data/app/messages.chat.free.text.messaging.sms-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
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.bumptech.glide.load.engine.DecodeJob$$ExternalSyntheticApiModelOutline1.df.DecodeJob$$ExternalSyntheticApiModelOutline1.m(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:1)
at com.bumptech.glide.load.engine.DecodeJob.init(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:84)
at com.bumptech.glide.load.engine.Engine$DecodeJobFactory.build(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:58)
at com.bumptech.glide.load.engine.Engine.waitForExistingOrStartNewJob(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:9)
at com.bumptech.glide.load.engine.Engine.load(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:6)
at com.bumptech.glide.request.SingleRequest.onSizeReady(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:219)
at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer.notifyCbs(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:23)
at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer.checkCurrentDimens(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:25)
at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer$SizeDeterminerLayoutListener.onPreDraw(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:40)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1014)
This happens on Android 6 devices due to the usage of https://github.com/bumptech/glide/blob/73c09cab9c7a6b784c3295dc1f29807fddfcd5a8/library/src/main/java/com/bumptech/glide/load/engine/DecodeJob.java#L34
It's not available on older Android OS versions. We can document the desugar steps on website, see
- https://developer.android.com/studio/write/java8-support
- https://developer.android.com/studio/write/java8-support-table
Version 5.0.4:
Caused by java.lang.ClassNotFoundException: Didn't find class "java.util.function.Supplier" on path: DexPathList[[zip file "/data/app/messages.chat.free.text.messaging.sms-1/base.apk"],nativeLibraryDirectories=[/data/app/messages.chat.free.text.messaging.sms-1/lib/arm64, /data/app/messages.chat.free.text.messaging.sms-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]] 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.bumptech.glide.load.engine.DecodeJob$$ExternalSyntheticApiModelOutline1.df.DecodeJob$$ExternalSyntheticApiModelOutline1.m(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:1) at com.bumptech.glide.load.engine.DecodeJob.init(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:84) at com.bumptech.glide.load.engine.Engine$DecodeJobFactory.build(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:58) at com.bumptech.glide.load.engine.Engine.waitForExistingOrStartNewJob(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:9) at com.bumptech.glide.load.engine.Engine.load(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:6) at com.bumptech.glide.request.SingleRequest.onSizeReady(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:219) at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer.notifyCbs(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:23) at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer.checkCurrentDimens(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:25) at com.bumptech.glide.request.target.ViewTarget$SizeDeterminer$SizeDeterminerLayoutListener.onPreDraw(r8-map-id-e25cfb834f7ea3041f87d4b1886e7814996dcaa773927d33d2058f7efba079e4:40) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1014)This happens on Android 6 devices due to the usage of
glide/library/src/main/java/com/bumptech/glide/load/engine/DecodeJob.java
Line 34 in 73c09ca
import java.util.function.Supplier; It's not available on older Android OS versions. We can document the desugar steps on website, see
- https://developer.android.com/studio/write/java8-support
- https://developer.android.com/studio/write/java8-support-table
I also reproduced this issue on the latest version. The solutions are as follows:
-
- Replacing Glie with version 4.16.0 resolves this issue.
-
- Replacing with coil-kt resolves this issue.
Same issue with 5.0.5.