Dali
Dali copied to clipboard
Failed resolution of: Lcom/jakewharton/disklrucache/DiskLruCache;
~~Might be related to #14~~
Code
Dali.create(this).load(R.drawable.ic_launcher_background).blurRadius(10).into(imgBackground)
Stacktrace
2019-07-26 16:55:46.462 31292-31292/com.marknjunge.blurryshadow E/BlurBuilder: Could not set into imageview
at.favre.lib.dali.builder.exception.BlurWorkerException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jakewharton/disklrucache/DiskLruCache;
at at.favre.lib.dali.builder.blur.BlurWorker.process(BlurWorker.java:153)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:48)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:27)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jakewharton/disklrucache/DiskLruCache;
at at.favre.lib.dali.builder.TwoLevelCache.getDiskCache(TwoLevelCache.java:72)
at at.favre.lib.dali.builder.TwoLevelCache.getFromDiskCache(TwoLevelCache.java:147)
at at.favre.lib.dali.builder.TwoLevelCache.get(TwoLevelCache.java:97)
at at.favre.lib.dali.builder.blur.BlurWorker.process(BlurWorker.java:73)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:48)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:27)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.jakewharton.disklrucache.DiskLruCache" on path: DexPathList[[zip file "/data/app/com.marknjunge.blurryshadow-Vc6sW-Lf0gDW7QCdqIz8GA==/base.apk"],nativeLibraryDirectories=[/data/app/com.marknjunge.blurryshadow-Vc6sW-Lf0gDW7QCdqIz8GA==/lib/arm, /data/app/com.marknjunge.blurryshadow-Vc6sW-Lf0gDW7QCdqIz8GA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at at.favre.lib.dali.builder.TwoLevelCache.getDiskCache(TwoLevelCache.java:72)
at at.favre.lib.dali.builder.TwoLevelCache.getFromDiskCache(TwoLevelCache.java:147)
at at.favre.lib.dali.builder.TwoLevelCache.get(TwoLevelCache.java:97)
at at.favre.lib.dali.builder.blur.BlurWorker.process(BlurWorker.java:73)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:48)
at at.favre.lib.dali.builder.blur.BlurWorker.call(BlurWorker.java:27)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Maybe proguard removed these classes for you, can you check that your config is correct?
Proguard wasn't active.
This is probably an issue with a newer version of the build tools, as I am currently not an android dev in my professional career I do not follow the latest updates. Any update from somebody else is welcome.
As a workaround you can add the dependency manually to build.gradle
implementation 'com.jakewharton:disklrucache:2.0.2'
Since I cannot reproduce this locally, making me think this is specific to your build setup, could you please try v0.4.0 since it was migrated to AndroidX, and maybe jetify broke this for us?
For me it's working fine with Dali 0.4.0 Thanks!