Failed to transform jar to match attributes

31.5k views Asked by At
Execution failed for task ':app:checkClassicGooglePlayDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:classicGooglePlayDebugRuntimeClasspath'.
   > Failed to transform SaaS_TalkingDataSDK_Android_V5.0.0.jar to match attributes {artifactType=enumerated-runtime-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for EnumerateClassesTransform: /home/circleci/project/app/libs/SaaS_TalkingDataSDK_Android_V5.0.0.jar.
         > zip END header not found

I am getting this error in Android project which has following configurations

build:gradle:7.0.4

And android.useAndroidX=true android.enableJetifier=true in gradle.properties

3

There are 3 answers

0
naXa stands with Ukraine On

If it happens locally, just delete the corrupted cache and restart Android Studio (or IntelliJ IDEA). Cache location for Gradle is in ~/.gradle.

If you want to clear cache in Circle CI, refer to this article: Clear project dependency cache

Source: a similar question.

0
virengujariya On

Turned out that TalkingDataSDK jar was big in size so we had to install git lfs on CI to fix the issue.

1
wahyu aris munandar On

use jdk 17 it's solve my problem