gpt4 book ai didi

android - "gradlew connectedCheck mergeAndroidReports"缺少属性异常 : No such property: REPORTS

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:25:53 25 4
gpt4 key购买 nike

我有一个设置了多个模块依赖项的 Android Studio + Gradle 项目。我正在尝试将每个模块的单元测试报告合并在一起(请参阅 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Multi-projects-reports)。当我运行 ./gradlew connectedCheck mergeAndroidReports --continue 它为每个模块运行单元测试时,它们都通过了,然后我得到了 :mergeAndroidReports 生命周期步骤的以下异常.

11:47:31.121 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:47:31.121 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:31.121 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:47:31.122 [ERROR] [org.gradle.BuildExceptionReporter] No such property: REPORTS for class: com.android.build.gradle.ReportingPlugin
11:47:31.122 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:31.122 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
11:47:31.123 [ERROR] [org.gradle.BuildExceptionReporter] groovy.lang.MissingPropertyException: No such property: REPORTS for class: com.android.build.gradle.ReportingPlugin
11:47:31.123 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.ReportingPlugin$_apply_closure2.doCall(ReportingPlugin.groovy:60)
11:47:31.123 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ConventionAwareHelper$1.getValue(ConventionAwareHelper.java:72)
11:47:31.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:136)
11:47:31.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:114)
11:47:31.124 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.internal.tasks.AndroidReportTask_Decorated.getReportsDir(Unknown Source)
11:47:31.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
11:47:31.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo$4.create(AnnotationProcessingTaskFactory.java:453)
11:47:31.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:168)
11:47:31.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo.getValue(AnnotationProcessingTaskFactory.java:451)
11:47:31.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Validator.validate(AnnotationProcessingTaskFactory.java:269)
11:47:31.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:41)
11:47:31.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
11:47:31.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
11:47:31.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
11:47:31.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
11:47:31.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
11:47:31.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)
11:47:31.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:266)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:135)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:95)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
11:47:31.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
11:47:31.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
11:47:31.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:46)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:37)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
11:47:31.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)

我应该在某处设置报告目录属性吗?

最佳答案

我遇到了类似的问题。我使用复制任务,在原始文件中我使用“${NUMBER}”,但我忘记在脚本中添加 NUMBER,例如

    copy {
from ant.properties['basedir']
into "${dir}"
expand(["NUMBER":"100"])
}

添加扩展将解决此类问题。 展开([“数字”:“100”])

关于android - "gradlew connectedCheck mergeAndroidReports"缺少属性异常 : No such property: REPORTS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24396169/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com