Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

java.lang.IllegalArgumentException: Disk Cache Location is not write-able #19

Closed
bostone opened this issue Apr 10, 2013 · 0 comments
Closed

Comments

@bostone
Copy link

bostone commented Apr 10, 2013

I have this piece of code to init image cache

final BitmapLruCache.Builder builder = new BitmapLruCache.Builder(context.getApplicationContext());
        builder.setMemoryCacheEnabled(true).setMemoryCacheMaxSizeUsingHeapSize();
        builder.setDiskCacheEnabled(true).setDiskCacheLocation(cacheLocation)
                .setRecyclePolicy(RecyclePolicy.DISABLED);
        this.imageCache = builder.build();

Sometimes it fails at the last line which I think is wrong. It should just gracefully disable SD caching if the error is caught

Here's stack trace

java.lang.IllegalArgumentException: Disk Cache Location is not write-able
at uk.co.senab.bitmapcache.BitmapLruCache$Builder.isValidOptionsForDiskCache(BitmapLruCache.java:737)
at uk.co.senab.bitmapcache.BitmapLruCache$Builder.build(BitmapLruCache.java:614)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants