Open HardFatal opened 2 years ago
AGP7.0在版本1.9.14.19才支持的。升级吧。
1.9.14.19也不行,更新说明说是支持了AGP7、R8,实测并没有解决,除了这两个问题外还有一个Manifest钟tinkerid更新的问题
1.9.14.19也不行,更新说明说是支持了AGP7、R8,实测并没有解决,除了这两个问题外还有一个Manifest钟tinkerid更新的问题
你新建项目接入试试,我已经成功接入了。
AGP7.0在版本1.9.14.19才支持的。升级吧。
你接入1.9.14.19、Gradle 7.0后,开启固定资源ID,没有遇到too late to modify additionalParameter的问题吗? 看源码逻辑 可以手动在build.gradle中指定aaptOptions.additionalParameters可以临时解决,暂未验证
还有这个开启R8的问题,R8 outlining 与 Tinker 存在兼容性问题 ,AGP7强制开启R8,如果使用,暂时可以在混淆规则中禁用优化,可临时解决-dontoptimize
还有一个随机出现的TinkerId未更新的问题,没遇上吗 , tinkerProcessManifest任务修改的目录是processManifest的产物目录build/intermediates/merged_manifests,在这里追加tinkerId,agp4.1后在processManifest新增的processManifestForPackage,产物目录是build/intermediates/packaged_manifests ,如果processManifestForPackage执行的比tinkerProcessManifest快,最后打进apk的AndroidManifest.xml中tinkerid并不是最新的。 我看源码里面只是声明了 tinkerProcessManifest 在processManifest的后面执行,并没有声明与processManifestForPackage的时序。 目前我是新加了一些代码,让processManifestForPackage 在tinkerProcessManifest之后执行解决的。
这几个问题,我解决方案都比较挫,大佬你们都是咋处理的?
但是com.tencent.bugly.tinker-support。这个插件只支持AGP4。有没有办法使用AGP7呢。不用com.tencent.bugly.tinker-support而是使用com.tencent.tinker.patch吗。我想用bugly管理,不使用bugly提供的插件有影响吗
参考tinker-support的代码逻辑,我们自实现了一套逻辑,无痕替换了tinker-support。上面提到的问题除了R8外,其他固定资源Id、TinkerId未更新等问题刚适配了。 关于R8,目前打算把minifyEnabled 改为false,禁用掉R8,单独使用proguard提供的插件进行混淆。https://www.guardsquare.com/blog/using-proguard-with-the-android-gradle-plugin
你们用bugly管理后台管理补丁包吗。tinker-support代码都没有开源啊。。你们反编译做的吗。这要不少的工作量吧。有点想弃坑,用sophix了。。。
参考tinker-support的代码逻辑,我们自实现了一套逻辑,无痕替换了tinker-support。上面提到的问题除了R8外,其他固定资源Id、TinkerId未更新等问题刚适配了。 关于R8,目前打算把minifyEnabled 改为false,禁用掉R8,单独使用proguard提供的插件进行混淆。https://www.guardsquare.com/blog/using-proguard-with-the-android-gradle-plugin
老铁实现tinker-support有开源的么,不会写插件
FAILURE: Build completed with 3 failures.
What went wrong: A problem was found with the configuration of task ':app:chappieSupportProcessBuild_onlineDebugManifest' (type 'ChappieManifestTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':app:chappieSupportProcessBuild_onlineDebugManifest' (type 'ChappieManifestTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem. at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.build(WorkValidationException.java:109) at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.get(WorkValidationException.java:91) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:97) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31) at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283) 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:49) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35) at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) 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:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
==============================================================================
What went wrong: A problem was found with the configuration of task ':app:tinkerProcessBuild_onlineDebugManifest' (type 'TinkerManifestTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':app:tinkerProcessBuild_onlineDebugManifest' (type 'TinkerManifestTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem. at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.build(WorkValidationException.java:109) at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.get(WorkValidationException.java:91) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:97) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31) at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283) 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:49) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35) at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) 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:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) 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:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:834)
==============================================================================
What went wrong: Some problems were found with the configuration of task ':app:tinkerProcessBuild_onlineDebugResourceId' (type 'TinkerResourceIdTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.internal.execution.WorkValidationException: Some problems were found with the configuration of task ':app:tinkerProcessBuild_onlineDebugResourceId' (type 'TinkerResourceIdTask').
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#missing_annotation for more details about this problem. at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.build(WorkValidationException.java:109) at org.gradle.internal.execution.WorkValidationException$BuilderWithSummary.get(WorkValidationException.java:91) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:97) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31) at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283) 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:49) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35) at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) 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:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) 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:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:834)
==============================================================================
1.9.14.19也不行,更新说明说是支持了AGP7、R8,实测并没有解决,除了这两个问题外还有一个Manifest钟tinkerid更新的问题
你新建项目接入试试,我已经成功接入了。
提交了 pr,官方一直没收录,解决 tinker id 不更新问题 https://github.com/Tencent/tinker/pull/1550
AGP7.0在版本1.9.14.19才支持的。升级吧。
你接入1.9.14.19、Gradle 7.0后,开启固定资源ID,没有遇到too late to modify additionalParameter的问题吗? 看源码逻辑 可以手动在build.gradle中指定aaptOptions.additionalParameters可以临时解决,暂未验证
还有这个开启R8的问题,R8 outlining 与 Tinker 存在兼容性问题 ,AGP7强制开启R8,如果使用,暂时可以在混淆规则中禁用优化,可临时解决-dontoptimize
还有一个随机出现的TinkerId未更新的问题,没遇上吗 , tinkerProcessManifest任务修改的目录是processManifest的产物目录build/intermediates/merged_manifests,在这里追加tinkerId,agp4.1后在processManifest新增的processManifestForPackage,产物目录是build/intermediates/packaged_manifests ,如果processManifestForPackage执行的比tinkerProcessManifest快,最后打进apk的AndroidManifest.xml中tinkerid并不是最新的。 我看源码里面只是声明了 tinkerProcessManifest 在processManifest的后面执行,并没有声明与processManifestForPackage的时序。 目前我是新加了一些代码,让processManifestForPackage 在tinkerProcessManifest之后执行解决的。
这几个问题,我解决方案都比较挫,大佬你们都是咋处理的?
提交了 pr,官方一直没收录,解决 tinker id 不更新问题 https://github.com/Tencent/tinker/pull/1550
问题是 ,你怎么保证 基础包和 patch包混淆一直那 ?
我自己试了一下 , 如果开启混淆 ,只添加 -dontoptimize 生成的patch 很会很大 , 目前发现要想解决只能禁用混淆 , 添加 -dontobfuscate
我自己试了一下 , 如果开启混淆 ,只添加 -dontoptimize 生成的patch 很会很大 , 目前发现要想解决只能禁用混淆 , 添加 -dontobfuscate
hallo, where do you add -dontoptimize and -dontobfuscate ?
AGP 升级到 7.0 以上gradle sync失败。
异常类型:编译异常 tinker版本:如: 1.9.14.18 gradle版本:如:7.2
tinker-sample-android/gradle/wrapper/gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 改为 distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
Caused by: com.android.build.gradle.internal.dsl.AgpDslLockedException: It is too late to modify additionalParameters It has already been read to configure this project. Consider either moving this call to be during evaluation, or using the variant API. at com.android.build.gradle.internal.dsl.decorator.LockableList.add(LockableList.kt:83) at com.android.build.gradle.internal.dsl.AaptOptions.additionalParameters(AaptOptions.java:166) at com.android.build.api.dsl.AndroidResources$additionalParameters.call(Unknown Source) at com.tencent.tinker.build.gradle.task.TinkerResourceIdTask.injectStableIdsFileOnDemand(TinkerResourceIdTask.groovy:90) at com.tencent.tinker.build.gradle.task.TinkerResourceIdTask$injectStableIdsFileOnDemand.call(Unknown Source) at com.tencent.tinker.build.gradle.TinkerPatchPlugin$_apply_closure1.doCall(TinkerPatchPlugin.groovy:132)