Solvedreact native fast image Execution failed for task ':react-native-fast-image:compileDebugJavaWithJavac'.

Any solution for this?
These are my dependencies.

"react-native": "^ 0.58.6",
"react-native-fast-image": "^ 6.0.3",

15 Answers

✔️Accepted Answer

I was able to work around this error by following this guide to disable the glide module, which is the module that has the erroneous generated content:


project.ext {
    excludeAppGlideModule = true

This is obviously not ideal, I'm unsure what side effects disabling this may cause. Would be great to update the module to support jetifier.

Other Answers:

For those struggling with 7.0.0, I came up with the solution to use 6.0.3 and keep Android running.
Checked with RN 0.59.10, but it should probably work with 0.60.x and above

  • Under android dir of your project add

This is required to use AndroidX and convert libraries in your project. (By the way you may also want to use for converting RN project to support AndroidX)

  • Under android dir of your project, open build.gradle and set glideVersion to 4.8.0 on your project. For example
buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
        glideVersion = "4.8.0"  // Add this

This will over write the setting in FastImage.

  • inside react-native-fast-image/android/build.gradle change below:
// Comment out this
//    implementation("com.github.bumptech.glide:annotations:${_glideVersion}") {
//        exclude group: "", module: "annotations"
//    }
    annotationProcessor "androidx.annotation:annotation:1.1.0" // Add this

You might want to write a post install script to rewrite the setting above.

com.github.bumptech.glide:annotation is where the annotation processing is generating we use androidx.annotation instead.

react-native-fast-image@7.0.0 supports AndroidX without modifications.

@DylanVann completely agreed ! But this is leading to Xcode crash.Can we have any workaround for this.

More Issues: