我不能使用GR8客户关系管理核心插件由于一个错误,我不能解决。
在buildconfig.groogy中添加了插件(compile ':crm-core: 2.0.2')和它的依赖项(compile ":twitter-bootstrap: 2.3.2“compile ":less-resources: 1.3.3.2"),就像tutorial中提到的那样。
但在编译时出现以下错误:
|Packaging Grails application
....
|Compiling 251 source files
Adding tenantId field to class grails.plugins.crm.core.CrmLookupEntity
.Error
|
Compilation error: startup failed:
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\core\ClosureDelegate.groovy: 33: [Static type checking] - Cannot statically compile constructor implicitly including non static elements from object initializers, properties or fields.
@ line 33, column 5.
@CompileStatic
^
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\core\ClosureToMap.groovy: 34: [Static type checking] - Cannot statically compile constructor implicitly including non static elements from object initializers, properties or fields.
@ line 34, column 5.
@CompileStatic
^
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\util\Graph.groovy: 98: [Static type checking] - Cannot return value of type java.util.Collection <grails.plugins.crm.util.Vertex> on method returning type java.util.List <Vertex>
@ line 98, column 9.
vList.findAll { Vertex v -> !eList.find { Edge e -> v == e.source } }
^
3 errors
Process finished with exit code 1我无法解释为什么会出现这些错误。我尝试将插件的版本更改为较旧的版本,并继续犯同样的错误。
我使用的是Grails 2.3.7、Groovy 2.4.0和Java JDK 1.7
发布于 2015-10-19 09:25:31
您需要下载grails的早期版本。
http://gr8crm.github.io/tutorials/gr8crm-web/index.html#_prerequisites
我让内容教程使用Grails 2.2.5,如果认为这不是太冒险的话。
与BuildConfig.groovy不同的是:
运行时":hibernate:2.2.4“运行时":jquery:1.11.1”
这只是一个“内容”演示。
我不得不从命令行来做,因为IDE在工作区里放了一些愚蠢的东西。我想,如果我想和它抗争足够长的时间,我已经弄明白了。但想让演示继续下去。
看看github分支m4-greach。它说可以使用“升级到Grails 2.4.5”
https://stackoverflow.com/questions/28543971
复制相似问题