Open varun0922 opened 2 years ago
removing // implementation 'com.github.bumptech.glide:annotations:4.13.1' worked.
I tried this image and i am able to load it fine with 4.13.1.
Are you sure you have an AppGlideModule to go along with the use of the AVIF integration? Please see the instructions for setting up integrations here: http://bumptech.github.io/glide/doc/configuration.html#applications
From the log, it seems like it is trying to go through the platform AVIF decoder (which will not be available on API level 28) and not the AVIF integration. Also, please note that emulators have some known bugs when dealing with native libraries, so the AVIF integration may or may not work on an emulator. If possible, please test it on a real device.
This is the AppGlideModule that I am using : `package com.example.avifexperiment
import android.content.Context import com.bumptech.glide.Glide import com.bumptech.glide.GlideBuilder import com.bumptech.glide.Registry import com.bumptech.glide.annotation.GlideModule import com.bumptech.glide.load.engine.cache.DiskLruCacheFactory import com.bumptech.glide.module.AppGlideModule
@GlideModule class LoaderGlideModule: AppGlideModule() {
override fun applyOptions(context: Context, builder: GlideBuilder) {
builder.setDiskCache(
DiskLruCacheFactory(
Glide.getPhotoCacheDir(context)?.absolutePath,
(LIMIT_CACHE_SIZE_IN_MB * SIZE_IN_MB * SIZE_IN_MB).toLong()
)
)
super.applyOptions(context, builder)
}
override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
super.registerComponents(context, glide, registry)
}
override fun isManifestParsingEnabled(): Boolean {
/*
* improve the initial startup time of Glide and
* avoid some potential problems with trying to parse metadata.
* */
return false
}
companion object {
private const val LIMIT_CACHE_SIZE_IN_MB = 50
private const val SIZE_IN_MB = 1024
}
} `
Do you have the "annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'" line in your gradle file ?
Otherwise, i am not sure what is going on. Using an empty @GlideModule and the right dependencies, i am able to load the URL using the AVIF integration.
implementation 'com.github.bumptech.glide:glide:4.13.1'
implementation 'com.github.bumptech.glide:avif-integration:4.13.1'
// implementation 'com.github.bumptech.glide:annotations:4.13.1'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.13.1'
kapt 'com.github.bumptech.glide:compiler:4.13.1'
hey @vigneshvg this is the snippet from my module gradle file.
I am using kotlin so has to use kapt
in place of annotationProcessor
.
I will re-check though.
Glide Version: 4.13.1
Integration libraries: AVIF
Device/Android Version: Emulator Pixel 3 API 28
Issue details / Repro steps / Use case background: I am trying to avif image form the URL https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.avif . But I am getting the exception. Other formats png, jpg, webp work fine. Please help.
Glide load line /
GlideModule
(if any) / list Adapter code (if any):Layout XML:
Stack trace / LogCat: