无法增强数据核心

时间:2014-12-19 04:04:28

标签: android google-app-engine gradle datanucleus

将我的gradle更新为1.0.1后,我的appengine构建失败

我收到错误:

groovy.lang.MissingPropertyException: Could not find property 'enhancerApi' on com.google.appengine.AppEnginePluginExtension_Decorated@1dd443c1

看来enhacerApi已被弃用,但我不确定如何解决这个问题。

  

App Engine SDK root = C:\ Users \ steve.gradle \ appengine-sdk \ appengine-java-sdk-1.9.17   Java classpath = C:\ workspace \ ShoutBox \ gradle \ wrapper \ gradle-wrapper.jar; C:\ Users \ steve.gradle \ appengine-sdk \ appengine-java-sdk-1.9.17 \ lib \ appengine-tools-api 。罐   Webapp源目录= C:\ workspace \ ShoutBox \ appengine \ src \ main \ webapp   增强DataNucleus类...
  完成了增强DataNucleus类。
  :appengine:appengineEnhance FAILED
  :appengine:appengineEnhance(Thread [main,5,main])完成。花了1.043秒。

     

失败:构建因异常而失败。

     
      
  • 出了什么问题:   任务执行失败':appengine:appengineEnhance'。

         
        

    增强DataNucleus类时出错。

      
  •   
  • 尝试:
      使用--debug选项运行以获得更多日志输出。

  •   
  • 例外情况是:   org.gradle.api.tasks.TaskExecutionException:任务':appengine:appengineEnhance'执行失败。       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)       在org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)       在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)       在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)       在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)       在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)       在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)       在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)       在org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)       在org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)       at org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)       at org.gradle.execution.taskgraph.Abs​​tractTaskPlanExecutor $ TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)       在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)       在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)       在org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)       在org.gradle.execution.DefaultBuildExecuter.access $ 200(DefaultBuildExecuter.java:23)       在org.gradle.execution.DefaultBuildExecuter $ 2.proceed(DefaultBuildExecuter.java:68)       在org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)       在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)       在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)       在org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)       在org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)       at org.gradle.launcher.exec.InProcessBuildActionExecuter $ DefaultBuildController.run(InProcessBuildActionExecuter.java:80)       在org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)       在org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)       在org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)       在org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)       在org.gradle.internal.Actions $ RunnableActionAdapter.execute(Actions.java:171)       在org.gradle.launcher.cli.CommandLineActionFactory $ ParseAndBuildAction.execute(CommandLineActionFactory.java:237)       在org.gradle.launcher.cli.CommandLineActionFactory $ ParseAndBuildAction.execute(CommandLineActionFactory.java:210)       在org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)       在org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)       在org.gradle.launcher.cli.CommandLineActionFactory $ WithLogging.execute(CommandLineActionFactory.java:206)       在org.gradle.launcher.cli.CommandLineActionFactory $ WithLogging.execute(CommandLineActionFactory.java:169)       在org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)       在org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)       在org.gradle.launcher.Main.doAction(Main.java:33)       在org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)       在org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)       在org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)       在org.gradle.launcher.GradleMain.main(GradleMain.java:23)       在org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)       在org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)       在org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)   引起:org.gradle.api.GradleException:增强DataNucleus类时发生错误。       在com.google.appengine.task.EnhanceTask.enhanceClasses(EnhanceTask.groovy:58)       在com.google.appengine.task.EnhanceTask.executeTask(EnhanceTask.groovy:34)       在com.google.appengine.task.AbstractTask.start(AbstractTask.groovy:38)       在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)       在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:579)       在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:562)       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)       在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)       ......还有47个   引起:groovy.lang.MissingPropertyException:找不到属性' enhancerApi'在com.google.appengine.AppEnginePluginExtension_Decorated@1dd443c1上。       at org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)       在org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)       at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:94)       在com.google.appengine.AppEnginePluginExtension_Decorated.getProperty(未知来源)       在com.google.appengine.AppEnginePlugin $ _configureEnhance_closure9_closure58.doCall(AppEnginePlugin.groovy:313)       在com.google.appengine.AppEnginePlugin $ _configureEnhance_closure9_closure58.doCall(AppEnginePlugin.groovy)       在org.gradle.api.internal.ConventionAwareHelper $ 2.getValue(ConventionAwareHelper.java:84)       在org.gradle.api.internal.ConventionAwareHelper $ MappedPropertyImpl.getValue(ConventionAwareHelper.java:136)       在org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:114)       在com.google.appengine.task.EnhanceTask_Decorated.getEnhancerApi(未知来源)       在com.google.appengine.task.EnhanceTask $ _enhanceClasses_closure1.doCall(EnhanceTask.groovy:52)       在com.google.appengine.task.EnhanceTask $ _enhanceClasses_closure1.doCall(EnhanceTask.groovy)       在org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:92)       在com.google.appengine.task.EnhanceTask.enhanceClasses(EnhanceTask.groovy:42)       ... 57更多

  •   
     

建立失败

     

总时间:19.158秒   停止了0个编译器守护程序。

1 个答案:

答案 0 :(得分:0)

在gradle构建文件中添加缺少的api标记解决了问题

enhancer {
    version = "v2"
    api="jdo"  // or "jpa"
    enhanceOnBuild = true
}