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

Failed resolution of: Lcom/jakewharton/disklrucache/DiskLruCache; #15

Open
MarkNjunge opened this issue Jul 26, 2019 · 6 comments
Open

Comments

@MarkNjunge
Copy link

MarkNjunge commented Jul 26, 2019

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) 
@patrickfav
Copy link
Owner

Maybe proguard removed these classes for you, can you check that your config is correct?

@MarkNjunge
Copy link
Author

Proguard wasn't active.

@patrickfav
Copy link
Owner

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.

@diegor2
Copy link

diegor2 commented Jun 12, 2020

As a workaround you can add the dependency manually to build.gradle

implementation 'com.jakewharton:disklrucache:2.0.2'

@patrickfav
Copy link
Owner

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?

@diegor2
Copy link

diegor2 commented Jul 27, 2020

For me it's working fine with Dali 0.4.0
Thanks!

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

No branches or pull requests

3 participants