Failed to transform file ‘xxx‘ to match attributes [How to Solve]

Failed to transform file ‘xxx’ to match attributes when opening previous projects.

I opened the previous project and encountered a Failed to transform file ‘xxx’ to match attributes error.

There is a problem with the added dependency cache

Solution:

C:\Users\Administrator\.gradle\caches\modules-2\files-2.1 directory, find the conflicting files, delete them, and recompile

Supplement:

If an error is reported:

Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=cn.jiguang.sdk:janalytics:2.0.0, variantName=null, artifactFile=C:\Users\dell\.gradle\caches\modules-2\files-2.1\cn.jiguang.sdk\janalytics\2.0.0\4abdfc462a6164fa5629301f8682a8adb7d3d332\janalytics-2.0.0.aar, extractedFolder=null, dependencyType=ANDROID, isWrappedModule=false, buildMapping={__current_build__=D:\Android\project\build\。。}, mavenCoordinatesCache=com.android.build.gradle.internal.ide.dependencies.MavenCoordinatesCacheBuildService$Inject@5859a341)

This error is also caused by file conflicts

Read More: