org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':okbuck'.

GitHub | NickPan365 | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 152#241306084

    GitHub | 6 months ago | NickPan365
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':okbuck'.
  2. 0

    Cannot get property 'apiLevel' on null object

    GitHub | 6 months ago | zhangyunhua
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':okbuck'.

    Root Cause Analysis

    1. java.lang.NullPointerException

      Cannot get property 'apiLevel' on null object

      at com.github.okbuilds.core.model.AndroidTarget.<init>()
    2. com.github.okbuilds
      ProjectUtil$_getTargetForOutput_closure4.doCall
      1. com.github.okbuilds.core.model.AndroidTarget.<init>(AndroidTarget.groovy:46)
      2. com.github.okbuilds.core.model.AndroidLibTarget.<init>(AndroidLibTarget.groovy:13)
      3. com.github.okbuilds.core.util.ProjectUtil$_getTargetForOutput_closure4.doCall(ProjectUtil.groovy:72)
      3 frames
    3. Gradle Core
      DomainObjectCollection$all$2.call
      1. org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
      2. org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110)
      3. org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115)
      4. org.gradle.api.DomainObjectCollection$all$2.call(Unknown Source)
      4 frames
    4. com.github.okbuilds
      OkBuckGradlePlugin$_apply_closure2.doCall
      1. com.github.okbuilds.core.util.ProjectUtil.getTargetForOutput(ProjectUtil.groovy:67)
      2. com.github.okbuilds.core.util.ProjectUtil$getTargetForOutput$1.call(Unknown Source)
      3. com.github.okbuilds.core.model.Scope$_extractConfigurations_closure2$_closure3.doCall(Scope.groovy:61)
      4. com.github.okbuilds.core.model.Scope$_extractConfigurations_closure2.doCall(Scope.groovy:54)
      5. com.github.okbuilds.core.model.Scope.extractConfigurations(Scope.groovy:50)
      6. com.github.okbuilds.core.model.Scope.<init>(Scope.groovy:40)
      7. com.github.okbuilds.core.model.Scope.<init>(Scope.groovy:31)
      8. com.github.okbuilds.core.model.JavaTarget.getApt(JavaTarget.groovy:31)
      9. com.github.okbuilds.core.model.JavaTarget.resolve(JavaTarget.groovy:75)
      10. com.github.okbuilds.core.model.JavaTarget$resolve.call(Unknown Source)
      11. com.github.okbuilds.okbuck.generator.BuckFileGenerator$_resolve_closure5.doCall(BuckFileGenerator.groovy:52)
      12. com.github.okbuilds.okbuck.generator.BuckFileGenerator.resolve(BuckFileGenerator.groovy:51)
      13. com.github.okbuilds.okbuck.generator.BuckFileGenerator$_generate_closure1.doCall(BuckFileGenerator.groovy:29)
      14. com.github.okbuilds.okbuck.generator.BuckFileGenerator.generate(BuckFileGenerator.groovy:28)
      15. com.github.okbuilds.okbuck.generator.BuckFileGenerator$generate.call(Unknown Source)
      16. com.github.okbuilds.okbuck.OkBuckGradlePlugin.generate(OkBuckGradlePlugin.groovy:96)
      17. com.github.okbuilds.okbuck.OkBuckGradlePlugin$_apply_closure2.doCall(OkBuckGradlePlugin.groovy:50)
      17 frames
    5. Gradle Core
      StoppableExecutorImpl$1.run
      1. org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:554)
      2. org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:535)
      3. org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:77)
      4. org.gradle.api.internal.tasks.TaskMutator$1.execute(TaskMutator.java:73)
      5. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
      6. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
      7. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
      8. org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
      9. org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
      10. org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
      11. org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
      12. org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
      13. org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
      14. org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
      15. org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
      16. org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
      17. org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
      18. org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
      19. org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
      20. org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
      20 frames