我已将包含上述文件的名为util-java.jar的jar添加到build .gradle文件中。在编译时没有错误。但在执行项目时,我得到NoClassDefFoundError
。
请告诉我如何根除这个问题。我的build.gradle如下: -
dependencies {
compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
compile project(":modules:customuser:customuser-api")
compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'
runtime group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'
compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'
runtime group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'
}
答案 0 :(得分:0)
类似的东西:
compileOnly group:" com.liferay",name:" com.liferay.portal.dao.orm.custom.sql",version:" 1.0.5&# 34;
应该帮助你。
答案 1 :(得分:0)
这是一个版本问题,更改
compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
到
compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.5.0"