Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Unresolved Requirement com.liferay.portal.kernel.service
Hello,I created a portlet called 'example', which works normally in version 7.1. I'm now in the process of migrating it to Liferay 7.2, but I'm getting errors.The portlet basically looks for the email of the user with the specified Custom Field 'CPF', as can be seen in the code below:
However, I'm getting an error that says it can not import the package 'com.liferay.portal.kernel.service', as in the picture below:
The package 'com.liferay.portal.kernel' is declared as a dependency of the project, below a photo of the build.gradle file.
Can anyone help me?

However, I'm getting an error that says it can not import the package 'com.liferay.portal.kernel.service', as in the picture below:

The package 'com.liferay.portal.kernel' is declared as a dependency of the project, below a photo of the build.gradle file.

Can anyone help me?
My best guess is that 4.17 is too high. Could you try it with 4.0.0?
It does work with 4.0.0, actually it works with all versions up to 4.13.1.
But, what i cant undestand is why it doesn't work with higher version.
But, what i cant undestand is why it doesn't work with higher version.
Well, you request that the runtime provides at least the version you have used to build your code.
So, when you request 4.0.0, you are golden since the runtime seems to provide 4.13.1.
A higher patch level might provide 4.17 or any higher version, there it might work with 4.17. But your current instance has only 4.13.1.
So, when you request 4.0.0, you are golden since the runtime seems to provide 4.13.1.
A higher patch level might provide 4.17 or any higher version, there it might work with 4.17. But your current instance has only 4.13.1.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™