Unresolved requi rement: Import-Package:com.liferay.portal.kernel.model 问题解决

在Windows 10上使用IDEA开发Liferay模块时,遇到Unresolved requirement错误,涉及com.liferay.portal.kernel.model包。尝试了各种解决方案,包括虾老三提到的版本问题,最终发现将Liferay SDK版本和Liferay运行环境版本均调整为7.3.0(如Liferay CE Portal 7.3.0 GA1),问题得到解决。
摘要由CSDN通过智能技术生成

开发环境
系统:windows10
开发工具IDE: idea
数据库:MySql 8.0.20
Liferay SDK: 7.3.0
Liferay运行环境:7.3.2
Liferay Tomcat: 9.0.33

 

创建完module 构建部署没有出错,就是把它放在Liferay 运行环境中运行时报如下错误

ERROR [Framework Event Dispatcher: Equinox Container: a223806f-5035-48e4-be05-175ec6ed9b0d][Framework:93] FrameworkEvent ERROR 
org.osgi.framework.BundleException: Could not resolve module: student.api [2293]_  Unresolved requirement: Import-Package: com.liferay.portal.kernel.model; version="[4.1.0,5.0.0)"_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:444)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1662)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值