微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Liferay 移动设备检测

如何解决Liferay 移动设备检测

我是 Liferay 的新手,我已经从 Liferay 市场下载了 Mobile Device Detection Lite 并将其放在部署文件夹中,然后在重新启动服务器后出现以下错误

ERROR [Framework Event dispatcher: Equinox Container: 58db3900-d87a-41e5-b86f-6542cbc57b6c][Framework:93] FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.mobile.device.detection.fiftyonedegrees [2720]_  Unresolved requirement: Import-Package: com.liferay.portal.kernel.mobile.device; version="[8.0.0,8.1.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)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

有人可以帮我解决上述问题吗。

PS:我使用的是 Liferay 版本:liferay-ce-portal-7.3.5-ga6

解决方法

找到了解决方案!
一开始我尝试了一种不推荐的hacky方式:
我在 com.liferay.portal.mobile.device.detection.fiftyonedegrees-4.0.8.jar - MANIFEST.MF 中修改了这些值:
com.liferay.portal.kernel.mobile.device;version=" [6.0,9.1)",com.liferay.portal.kernel.util;version="[6.12,11)"
使 jar 文件可部署,但不应使用此方法。

推荐的解决方案是从
https://mvnrepository.com/artifact/com.liferay/com 下载:
com.liferay.portal.mobile.device.detection.fiftyonedegrees-5.0.8.jar .liferay.portal.mobile.device.detection.fiftyonedegrees/5.0.8 并部署它。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。