gradle.properties kapt.incremental.apt = true中断构建

时间:2019-06-26 05:02:05

标签: gradle kotlin android-gradle kapt

有没有人有渐进倾向? 我通过kapt.incremental.apt=true

将其打开

但随后gradle中断了

* What went wrong:
Execution failed for task ':core:kaptDebugKotlin'.
> Could not resolve all files for configuration ':core:_classStructurekaptDebugKotlin'.
   > Failed to transform file 'classes.jar' to match attributes {artifactType=class-structure, org.gradle.usage=java-runtime-jars}
      > Execution failed for StructureArtifactTransform: C:\Users\ursus\.gradle\caches\transforms-2\files-2.1\d17b7c88a03f1112fe0ba327a2d0eee6\jars\classes.jar.
         > java.lang.IllegalArgumentException (no error message)
   > Failed to transform file 'runtime-jvm-1.1.3.jar' to match attributes {artifactType=class-structure, org.gradle.usage=java-runtime-jars}
      > Execution failed for StructureArtifactTransform: C:\Users\ursus\.gradle\caches\modules-2\files-2.1\com.squareup.sqldelight\runtime-jvm\1.1.3\133500e0dcd9092c8f376d5add6ad7c4afb7177e\runtime-jvm-1.1.3.jar.
         > java.lang.IllegalArgumentException (no error message)
   > Failed to transform file 'kotlin-stdlib-jdk7-1.3.40.jar' to match attributes {artifactType=class-structure, org.gradle.usage=java-runtime-jars}
      > Execution failed for StructureArtifactTransform: C:\Users\ursus\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.3.40\2995de8f68444ad47f29e7b59962ac31e6301d7e\kotlin-stdlib-jdk7-1.3.40.jar.
         > java.lang.IllegalArgumentException (no error message)

....被截断,相同错误,但依赖性不同

使用--stacktrace运行可以得到更多相同的结果,只是看起来很有希望

Caused by: java.lang.IllegalArgumentException
        at org.jetbrains.org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:79)
        at org.jetbrains.kotlin.gradle.internal.kapt.incremental.ClassAbiExtractor.<init>(ClassAbiExtractor.kt:12)
        at org.jetbrains.kotlin.gradle.internal.kapt.incremental.ClasspathAnalyzerKt.analyzeInputStream(ClasspathAnalyzer.kt:70)
        at org.jetbrains.kotlin.gradle.internal.kapt.incremental.ClasspathAnalyzerKt.visitJar(ClasspathAnalyzer.kt:61)
        at org.jetbrains.kotlin.gradle.internal.kapt.incremental.ClasspathAnalyzerKt.access$visitJar(ClasspathAnalyzer.kt:1)
        at org.jetbrains.kotlin.gradle.internal.kapt.incremental.StructureArtifactTransform.transform(ClasspathAnalyzer.kt:23)
        at org.gradle.api.internal.artifacts.transform.LegacyTransformer.transform(LegacyTransformer.java:76)
        at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker$TransformerExecution.execute(DefaultTransformerInvoker.java:274)
        at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
        at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
        at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
        at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
        at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:201)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
        at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
        at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
        at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:77)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
        at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
        at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvoker.lambda$invoke$2(DefaultTransformerInvoker.java:148)
        ... 39 more

org.gradle.jvmargs=-Xmx1536m
org.gradle.parallel=true
kotlin.code.style=official
kotlin.parallel.tasks.in.project=true
kapt.include.compile.classpath=false
kapt.incremental.apt=true <----
kapt.use.worker.api=true
android.useAndroidX=true
android.enableJetifier=true

等级5.1.1; agp 3.4.1,kotlin 1.3.40

0 个答案:

没有答案