title: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:javaPreCompileDebug'
body: <p>Hello ive been searching the web and didnt find any solution to this. 
  here is my gradle.Everything started when android app stopped compiling because it said something about androidx and the class FileProvider and all my trouble started.Also i was having this error : The given artifact contains a string literal with a package reference 'android.support.v4.content' that cannot be safely rewritten. for androidx.
  But the solution had to do something with butterknife but i erased every usage and implementations from gradle related into butterknife.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.mac.mycarapp"
          minSdkVersion 19
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          multiDexEnabled true //Add this
  
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility = '1.8'
          targetCompatibility = '1.8'
      }
  }
  
  dependencies {
  //    implementation fileTree(include: ['*.jar'], dir: 'libs')
  //    implementation 'com.android.support:appcompat-v7:28.0.0'
  ////    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  ////    implementation 'com.google.android.material:material:1.0.0'
  ////    testImplementation 'junit:junit:4.12'
  ////    implementation 'com.android.support:support-v4:28.0.0'
  //
  ////    androidTestImplementation 'androidx.test:runner:1.1.0'
  ////    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
  //    //    implementation 'com.parse:parse-android:1.17.3'
  //
  //    implementation 'com.github.bumptech.glide:glide:4.7.1'
  //    implementation 'de.hdodenhof:circleimageview:2.2.0'
  //    implementation files('libs/universal-image-loader-1.9.4-SNAPSHOT.jar')
  //    implementation 'com.github.sundeepk:compact-calendar-view:3.0.0'
  //    implementation 'com.github.tibolte:agendacalendarview:1.0.4'
  //    implementation 'com.miguelcatalan:materialsearchview:1.4.0'
  //    implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.20.0'
  //    implementation 'com.github.parse-community:ParseLiveQuery-Android:1.1.0'
  ////    implementation 'androidx.recyclerview:recyclerview:1.0.0'
  //    implementation 'com.google.firebase:firebase-core:17.0.1'
  ////    implementation 'androidx.appcompat:appcompat:1.0.2'
  ////    implementation 'androidx.annotation:annotation:1.0.2'
  //
  //    implementation 'com.google.android.gms:play-services-maps:16.1.0'
  //    implementation 'com.karumi:dexter:4.2.0'
  //
      implementation 'com.google.android.gms:play-services-location:16.0.0'
  //
  //    implementation "com.github.parse-community.Parse-SDK-Android:parse:1.18.5"
  //    // for FCM Push support (optional)
  //    implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.20.0"
  //    // for Kotlin extensions support (optional)
  //    implementation "com.github.parse-community.Parse-SDK-Android:ktx:1.20.0"
  //    implementation "com.parse.bolts:bolts-android:1.4.0"
  //    implementation "com.parse:parse-android:1.17.3"
  //    implementation'com.google.firebase:firebase-auth:18.1.0'
  //    implementation 'com.google.firebase:firebase-messaging:19.0.1'
  ////    implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
  ////    implementation 'androidx.recyclerview:recyclerview:1.1.0-beta01'
  //
  //
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      implementation 'com.google.android.material:material:1.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
      //    implementation 'com.parse:parse-android:1.17.3'
      implementation 'com.google.android.material:material:1.0.0'
      implementation 'com.jakewharton:butterknife:8.8.1'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
      implementation 'com.github.bumptech.glide:glide:4.7.1'
      implementation 'de.hdodenhof:circleimageview:2.2.0'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      implementation files('libs/universal-image-loader-1.9.4-SNAPSHOT.jar')
      implementation 'com.github.sundeepk:compact-calendar-view:3.0.0'
      implementation 'com.github.tibolte:agendacalendarview:1.0.4'
      implementation 'com.miguelcatalan:materialsearchview:1.4.0'
      implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.18.5'
      //    implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.20.0'
      implementation 'com.github.parse-community:ParseLiveQuery-Android:1.1.0'
      implementation 'androidx.recyclerview:recyclerview:1.0.0'
      //    implementation 'com.google.android.gms:play-services:11.4.0'
      //   implementation "com.github.parse-community.Parse-SDK-Android:parse:1.19.0"
      //    implementation 'com.github.parse-community:ParseLiveQuery-Android:1.1.0'
      implementation 'com.google.android.gms:play-services-maps:16.1.0'
  
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>Most of the code is commented because i was forced to migrate to androidx because of a fileProvider class.</p>
  
  <p>this is the error compiler.</p>
  
  <pre><code>    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:javaPreCompileDebug'.
      at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:67)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
      at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
      at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
      at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
      at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
      at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
      at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
      at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugAnnotationProcessorClasspath'.
      at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:1175)
      at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$2100(DefaultConfiguration.java:135)
      at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:1150)
      at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:72)
      at org.gradle.internal.snapshot.impl.DefaultFileSystemSnapshotter$FileCollectionLeafVisitorImpl.visitCollection(DefaultFileSystemSnapshotter.java:240)
      at org.gradle.api.internal.file.AbstractFileCollection.visitLeafCollections(AbstractFileCollection.java:233)
      at org.gradle.api.internal.file.CompositeFileCollection.visitLeafCollections(CompositeFileCollection.java:205)
      at org.gradle.internal.snapshot.impl.DefaultFileSystemSnapshotter.snapshot(DefaultFileSystemSnapshotter.java:126)
      at org.gradle.internal.fingerprint.impl.AbstractFileCollectionFingerprinter.fingerprint(AbstractFileCollectionFingerprinter.java:47)
      at org.gradle.internal.fingerprint.classpath.impl.DefaultClasspathFingerprinter.fingerprint(DefaultClasspathFingerprinter.java:61)
      at org.gradle.api.internal.changedetection.changes.TaskFingerprintUtil.fingerprintTaskFiles(TaskFingerprintUtil.java:82)
      at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.createExecution(CacheBackedTaskHistoryRepository.java:123)
      at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.access$100(CacheBackedTaskHistoryRepository.java:46)
      at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1.getBeforeExecutionState(CacheBackedTaskHistoryRepository.java:86)
      at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getExecutionStateChanges(DefaultTaskArtifactStateRepository.java:189)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.getChangesSincePreviousExecution(ExecuteActionsTaskExecuter.java:182)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
      at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:91)
      at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
      at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
      at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:119)
      at org.gradle.api.internal.tasks.execution.ResolvePreviousStateExecuter.execute(ResolvePreviousStateExecuter.java:43)
      at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
      at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
      at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:94)
      at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:56)
      at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:55)
      at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
      ... 25 more
  Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform artifact 'butterknife-compiler.jar (com.jakewharton:butterknife-compiler:8.8.1)' to match attributes {artifactType=processed-jar, org.gradle.usage=java-runtime-jars}
      at org.gradle.api.internal.artifacts.transform.TransformingArtifactVisitor.visitArtifact(TransformingArtifactVisitor.java:53)
      at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ArtifactBackedResolvedVariant$SingleArtifactSet.visit(ArtifactBackedResolvedVariant.java:112)
      at org.gradle.api.internal.artifacts.transform.TransformCompletion.visit(TransformCompletion.java:42)
      at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.CompositeResolvedArtifactSet$CompositeResult.visit(CompositeResolvedArtifactSet.java:83)
      at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ParallelResolveArtifactSet$VisitingSet.visit(ParallelResolveArtifactSet.java:64)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.visitArtifacts(DefaultLenientConfiguration.java:256)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.access$500(DefaultLenientConfiguration.java:69)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$2.run(DefaultLenientConfiguration.java:231)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.visitArtifactsWithBuildOperation(DefaultLenientConfiguration.java:228)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.access$200(DefaultLenientConfiguration.java:69)
      at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$1.visitArtifacts(DefaultLenientConfiguration.java:133)
      at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:1147)
      ... 52 more
  Caused by: org.gradle.internal.execution.ExecutionException: Execution failed for JetifyTransform: /Users/mac/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-compiler/8.8.1/b2f4505a1babb7b7c11abbbf8ea4c90b18c3aeac/butterknife-compiler-8.8.1.jar.
      at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
      at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
      at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:43)
      at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:29)
      at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:134)
      at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$3(CacheStep.java:83)
      at java.util.Optional.orElseGet(Optional.java:267)
      at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
      at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:36)
      at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
      at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
      at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$1(SkipUpToDateStep.java:91)
      at java.util.Optional.orElseGet(Optional.java:267)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:91)
      at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
      at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
      at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker.lambda$invoke$0(DefaultTransformerInvoker.java:131)
      at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker.fireTransformListeners(DefaultTransformerInvoker.java:179)
      at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker.lambda$invoke$1(DefaultTransformerInvoker.java:116)
      at org.gradle.api.internal.artifacts.transform.ImmutableTransformationWorkspaceProvider.lambda$withWorkspace$0(ImmutableTransformationWorkspaceProvider.java:81)
      at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:90)
      at org.gradle.cache.internal.DefaultCacheAccess.withFileLock(DefaultCacheAccess.java:194)
      at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:170)
      at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:194)
      at org.gradle.api.internal.artifacts.transform.ImmutableTransformationWorkspaceProvider.withWorkspace(ImmutableTransformationWorkspaceProvider.java:76)
      at org.gradle.api.internal.artifacts.transform.AbstractCachingTransformationWorkspaceProvider.lambda$withWorkspace$0(AbstractCachingTransformationWorkspaceProvider.java:54)
      at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4717)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3444)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2193)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2152)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2042)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3850)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4712)
      at org.gradle.api.internal.artifacts.transform.AbstractCachingTransformationWorkspaceProvider.withWorkspace(AbstractCachingTransformationWorkspaceProvider.java:53)
      at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker.invoke(DefaultTransformerInvoker.java:115)
      at org.gradle.api.internal.artifacts.transform.TransformationStep.lambda$transform$1(TransformationStep.java:69)
      at java.util.Optional.orElseGet(Optional.java:267)
      at org.gradle.api.internal.artifacts.transform.TransformationStep.transform(TransformationStep.java:66)
      at org.gradle.api.internal.artifacts.transform.TransformationNode$InitialTransformationNode$1.transform(TransformationNode.java:139)
      at org.gradle.api.internal.artifacts.transform.TransformationNode$ArtifactTransformationStepBuildOperation.call(TransformationNode.java:212)
      at org.gradle.api.internal.artifacts.transform.TransformationNode$ArtifactTransformationStepBuildOperation.call(TransformationNode.java:195)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
      at 
  </code></pre>
  
  <p>By some way i havent found any posible solution to this problem. Please help!.</p>