Error: Unable to resolve dependency for compileClasspath using transform ExtractAarTransform

Viewed 6201

For a helping lib I use, I recently get:

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform file 'mylib-release.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

and then on gradle console:

Could not resolve all files for configuration ':demo:debugCompileClasspath'.

Failed to transform file 'mylib-release.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform java.io.FileNotFoundException: mylib-release.aar (Datei oder Verzeichnis nicht gefunden)

It was working last week, unfortunately I forgot what changed

3 Answers

In my case this error was due to that .aar was missing so in your case check that your lib mylib-release.aar exists and is found in the debug compileClasspath.

Well, you need to generate .AAR file by yourself.

go to root project folder -> your proj -> build -> outputs -> aar -> delete folder or content

go to gradle tools window (usually top right corner of android studio) and get execute task build

your proj-lib-aar -> your proj -> Tasks -> build (double click)

Related