Closed Heart-Beats closed 7 months ago
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。
readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。
readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
我改了项目里的 AGP 和 Gradle 版本,同步时会报 namespace 未指定,这个每个模块都缺少,还有其他的报错,
createPackagePluginTask 方法中设置zip输出的文件名所需方法这块代码的替代方法找到了,但是目前代码由于其他同步报错无法通过:
相关设置代码的方法应该还需要加上 Gradle 版本的判断,不然低版本运行是不是也会失败?
目前我准备采用项目中使用的 AGP 和 Gradle 版本来编译插件,但这个对于后续项目显然是不现实的,尤其对于目前的 Compose 项目来说,普遍使用的 Gradle 版本都较高
这个脚本我对应执行了,但是没啥反应,看了相关代码应该是和有些环境变量本地机器无配置有关系
大佬,除了上述问题以外的问题,我发现 compileSdk 目前最大也是支持 33, 当我改为 34 时报以下错误:
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\16.jar
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\16.jar
at com.android.build.gradle.internal.dexing.DexWorkActionKt.process(DexWorkAction.kt:179)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.processNonIncrementally(DexWorkAction.kt:145)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.launchProcessing(DexWorkAction.kt:73)
at com.android.build.gradle.internal.dexing.DexWorkAction.run(DexWorkAction.kt:45)
... 36 more
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:183)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:122)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.process(DexWorkAction.kt:175)
... 39 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at Version.fakeStackEntry(Version_4.0.52.java:0)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:75)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:28)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:27)
at com.android.tools.r8.internal.vk.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:2)
at com.android.tools.r8.D8.run(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:11)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:120)
... 40 more
Caused by: com.android.tools.r8.kotlin.H
Caused by: com.android.tools.r8.kotlin.H
at com.android.tools.r8.kotlin.j.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:41)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:46)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:40)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:321)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:39)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:45)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:35)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.internal.H20.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:50)
at com.android.tools.r8.D8.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:90)
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:154)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:1)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:24)
... 43 more
Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:174)
... 45 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:566)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:527)
at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:88)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:14)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:45)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:35)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.internal.H20.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:50)
at com.android.tools.r8.D8.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:90)
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:154)
... 45 more
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
Cause 11: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:339)
at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2(DefaultAsyncWorkTracker.java:130)
at org.gradle.internal.Factories$1.create(Factories.java:31)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:321)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:304)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLock(DefaultWorkerLeaseService.java:309)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:126)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:88)
Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:78)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:66)
at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:247)
at com.android.build.gradle.internal.tasks.DexArchiveBuilderTaskDelegate.doProcess(DexArchiveBuilderTaskDelegate.kt:220)
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
at com.android.build.gradle.internal.tasks.DexArchiveBuilderTask.doTaskAction(DexArchiveBuilderTask.kt:224)
at com.android.build.gradle.internal.tasks.NewIncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:69)
at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51)
at com.android.build.gradle.internal.tasks.NewIncrementalTask.taskAction(NewIncrementalTask.kt:46)
at jdk.internal.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:236)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:221)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:204)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:187)
at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:165)
at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89)
at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:53)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:50)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:40)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:124)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:80)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:58)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:181)
at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:71)
at org.gradle.internal.Either$Right.fold(Either.java:175)
at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:69)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:47)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:110)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:56)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:56)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:73)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:89)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:50)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:114)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:57)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:76)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:50)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNoEmptySources(SkipEmptyWorkStep.java:254)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:91)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:56)
at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:43)
at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:31)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:281)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:139)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:327)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:314)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:307)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:293)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:417)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:339)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.gradle.tooling.BuildException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\63.jar
at com.android.build.gradle.internal.dexing.DexWorkAction.run(DexWorkAction.kt:53)
at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66)
Caused by: org.gradle.tooling.BuildException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\63.jar
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:205)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:187)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:120)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:162)
at org.gradle.internal.Factories$1.create(Factories.java:31)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:114)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:157)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:126)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 5 more
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\63.jar
at com.android.build.gradle.internal.dexing.DexWorkActionKt.process(DexWorkAction.kt:179)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.processNonIncrementally(DexWorkAction.kt:145)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.launchProcessing(DexWorkAction.kt:73)
at com.android.build.gradle.internal.dexing.DexWorkAction.run(DexWorkAction.kt:45)
... 36 more
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:183)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process: E:\AndroidProject\ShadowPlugin\plugin\test\build\intermediates\transforms\ShadowTransform\plugin\debug\63.jar
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:122)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.process(DexWorkAction.kt:175)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
... 39 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at Version.fakeStackEntry(Version_4.0.52.java:0)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:75)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:28)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:27)
at com.android.tools.r8.internal.vk.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:2)
at com.android.tools.r8.D8.run(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:11)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:120)
... 40 more
Caused by: com.android.tools.r8.kotlin.H
Caused by: com.android.tools.r8.kotlin.H
at com.android.tools.r8.kotlin.j.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:41)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:46)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:40)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:321)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:39)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:45)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:35)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.internal.H20.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:50)
at com.android.tools.r8.D8.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:90)
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:154)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:1)
at com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:24)
... 43 more
Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:174)
... 45 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:566)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:527)
at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:88)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:14)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:45)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:43)
at com.android.tools.r8.utils.x.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:42)
at com.android.tools.r8.internal.OB.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:35)
at com.android.tools.r8.D8.b(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:9)
at com.android.tools.r8.internal.H20.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:50)
at com.android.tools.r8.D8.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:90)
at com.android.tools.r8.D8.d(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:154)
... 45 more
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.kotlin.H
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
之所以有上述的需求,是因为我想最新的官方 sunflower 项目改为插件作为示例,目前该项目使用 Compose 构建的,我本来想降为 compileSdk 33,里面使用的依赖库基本都要求 compileSdk 34, 尝试改几个依赖库版本后发现需要一个一个尝试,这是显然但是不现实, 希望大佬也可以看下这个问题, 相关示例测试代码:ShadowPlugin, 修改 compileSdk 即可进行测试:
打包插件配置在 shadow.gradle 这个文件内,去除 pluginApk2 配置,修改 compileSdk 33 即可打包 test 模块插件
Gradle 变量配置:GITHUB_PACKAGES_READ_TOKEN=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
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。
readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
大佬,这个问题的修复我已经提交了一个 pull 请求,除了原本的打包文件名设置外,相关废弃方法我也进行了替换, 我本地测试在 AGP 7.4.2 | Gradle 7.5 和 AGP 8.3.0 | Gradle 8.4 测试都是可以打包插件成功的, ,你看下测试没问题是不是可以进行合并, 另外这个 compileSdk 34 版本问题,我发现在修改 Gradle 版本为 8.4 后,也是可以编译成功, 也就是这个问题也给一并解决了😂
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。 readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
大佬,这个问题的修复我已经提交了一个 pull 请求,除了原本的打包文件名设置外,相关废弃方法我也进行了替换, 我本地测试在 AGP 7.4.2 | Gradle 7.5 和 AGP 8.3.0 | Gradle 8.4 测试都是可以打包插件成功的, ,你看下测试没问题是不是可以进行合并, 另外这个 compileSdk 34 版本问题,我发现在修改 Gradle 版本为 8.4 后,也是可以编译成功, 也就是这个问题也给一并解决了😂
请问使用gradle8编译有遇到这个问题吗: A problem was found with the configuration of task ':sample-app:duplicatePluginDebugApkTask' (type 'Copy').
Gradle detected a problem with the following location: 'E:\workspace\Shadow\projects\sample\source\sample-plugin\sample-app\build\outputs\apk\plugin\debug'.
Reason: Task ':sample-app:createPluginDebugApkListingFileRedirect' uses this output of task ':sample-app:duplicatePluginDebugApkTask' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。 readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
大佬,这个问题的修复我已经提交了一个 pull 请求,除了原本的打包文件名设置外,相关废弃方法我也进行了替换, 我本地测试在 AGP 7.4.2 | Gradle 7.5 和 AGP 8.3.0 | Gradle 8.4 测试都是可以打包插件成功的, ,你看下测试没问题是不是可以进行合并, 另外这个 compileSdk 34 版本问题,我发现在修改 Gradle 版本为 8.4 后,也是可以编译成功, 也就是这个问题也给一并解决了😂
请问使用gradle8编译有遇到这个问题吗: A problem was found with the configuration of task ':sample-app:duplicatePluginDebugApkTask' (type 'Copy').
Gradle detected a problem with the following location: 'E:\workspace\Shadow\projects\sample\source\sample-plugin\sample-app\build\outputs\apk\plugin\debug'. Reason: Task ':sample-app:createPluginDebugApkListingFileRedirect' uses this output of task ':sample-app:duplicatePluginDebugApkTask' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions:
- Declare task ':sample-app:duplicatePluginDebugApkTask' as an input of ':sample-app:createPluginDebugApkListingFileRedirect'.
- Declare an explicit dependency on ':sample-app:duplicatePluginDebugApkTask' from ':sample-app:createPluginDebugApkListingFileRedirect' using Task#dependsOn.
- Declare an explicit dependency on ':sample-app:duplicatePluginDebugApkTask' from ':sample-app:createPluginDebugApkListingFileRedirect' using Task#mustRunAfter.
目前整个源码是不支持 Gradle 8 的,这块改动的地方比较多,我只是单独弄了 com.tencent.shadow.plugin 这个插件支持 Gradle 8 上运行,整个源码部分还是采用自带的 Gradle 版本,因为 SDK 只需要编译成功项目中引入就可以,不受项目的 Gradle 版本限制,但 com.tencent.shadow.plugin 这个插件不同。,它会受引入项目的 gradle 版本限制。
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。 readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
大佬,这个问题的修复我已经提交了一个 pull 请求,除了原本的打包文件名设置外,相关废弃方法我也进行了替换, 我本地测试在 AGP 7.4.2 | Gradle 7.5 和 AGP 8.3.0 | Gradle 8.4 测试都是可以打包插件成功的, ,你看下测试没问题是不是可以进行合并, 另外这个 compileSdk 34 版本问题,我发现在修改 Gradle 版本为 8.4 后,也是可以编译成功, 也就是这个问题也给一并解决了😂
您好, 我这边更新了gradle到8.2, AGP更新到8.2.0后, sync是报了下面错误, 请问您是怎么解决的, 是需要把插件源码下载下来然后做什么操作吗? 还是直接引入就可以?
An exception occurred applying plugin request [id: 'com.tencent.shadow.plugin']
Failed to apply plugin 'com.tencent.shadow.plugin'. Could not create an instance of type com.tencent.shadow.core.gradle.extensions.PackagePluginExtension. Could not generate a decorated class for type PackagePluginExtension. org/json/simple/JSONObject
java.lang.NoSuchMethodError: 'void org.gradle.api.tasks.bundling.Zip.setArchiveName(java.lang.String)'
看起来就是设置zip输出的文件名所需方法被删了,应该很容易找到替换的测试方法吧。着急的话自己修一下就好了。 readme确实内容比较少,因为我习惯把需要说明的内容写在commit message里。所以你搜一下agp应该能看到兼容性测试的更新。那里面就有最后测试支持的版本。
大佬,这个问题的修复我已经提交了一个 pull 请求,除了原本的打包文件名设置外,相关废弃方法我也进行了替换, 我本地测试在 AGP 7.4.2 | Gradle 7.5 和 AGP 8.3.0 | Gradle 8.4 测试都是可以打包插件成功的, ,你看下测试没问题是不是可以进行合并, 另外这个 compileSdk 34 版本问题,我发现在修改 Gradle 版本为 8.4 后,也是可以编译成功, 也就是这个问题也给一并解决了😂
您好, 我这边更新了gradle到8.2, AGP更新到8.2.0后, sync是报了下面错误, 请问您是怎么解决的, 是需要把插件源码下载下来然后做什么操作吗? 还是直接引入就可以?
An exception occurred applying plugin request [id: 'com.tencent.shadow.plugin']
Failed to apply plugin 'com.tencent.shadow.plugin'. Could not create an instance of type com.tencent.shadow.core.gradle.extensions.PackagePluginExtension.
Could not generate a decorated class for type PackagePluginExtension. org/json/simple/JSONObject
你这个错误没看到过,但是看你的描述里,更新了gradle到8.2, AGP更新到8.2.0后应该是指宿主和插件工程吧,虽然我报的问题作者修复提交了,但是他可能并没有发布相关版本。因此你最好需要拉取 shadow 源码然后自己编译发布,再在项目中引入使用。
大佬,问题如上所述,目前我使用 AGP 版本 :8.3.0, Gradle 版本:8.4, 在 Gradle Sync 时会报如下错误:
另外提个建议:为了避免后面的相关开发者也会遇到相关问题,可以在项目的 Readme 中写明相关信息,目前好像从相关说明中没有看到关于此的介绍。