Skip to content Skip to sidebar Skip to footer

Can't Set Glidebuilder

I use Glide library for Android. I want to set the cache in my custom folder, so the standard cache folder can be clean (with Master Clean for example). For this reason I use this

Solution 1:

In Glide 3.5, Glide.isSetup() and Glide.setup() are deprecated. The best way to do this is to use GlideModules to do this kind of configuration lazily. Check out the wiki page on configuration.

Solution 2:

Try use:

if (!Glide.isSetup()) {
   GlideBuildergb=newGlideBuilder(this);
   DiskCachedlw= DiskLruCacheWrapper.get(newFile(Environment.getExternalStorageDirectory().getAbsolutePath() + "/myCatch/"), 250 * 1024 * 1024);
   gb.setDiskCache(dlw);
   Glide.setup(gb);
}

Post a Comment for "Can't Set Glidebuilder"