Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

The error seems to be caused by corrupt Jetified files.

Delete ONLY the corrupted .aar from the Gradle caches folder:

rm ~/.gradle/caches/modules-2/files-2.1/path-to/some-release.aar

The "path-to" will be probably be the package name e.g., com.example.somerelease

Sometimes it is possible to get the path of the file to delete from the error message itself and cut and paste it into the terminal in order to execute the rm command.

Deleting the entire folder is not an optimal solution as all the dependencies will need to be Jetified again. If you're already having corruption issues, you're likely to encounter the issue again.


I could swear I had already tried this, but specifying a set of matchingFallbacks for the build types did the trick:

buildTypes {
    release {
        // blah blah
        matchingFallbacks = ['release']
    }
    enterprise {
        // blah blah
        matchingFallbacks = ['release']
    }
    debug {
        // blah blah
        matchingFallbacks = ['debug']
    }
}

More here


Try this:

implementation fileTree(include:[':some-lib'], dir: "../lib/path")