RE: Unresolved Requirement com.liferay.portal.kernel.service

diego macedo, modified 6 Years ago. New Member Posts: 8 Join Date: 11/11/15 Recent Posts
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?
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
My best guess is that 4.17 is too high. Could you try it with 4.0.0?
diego macedo, modified 6 Years ago. New Member Posts: 8 Join Date: 11/11/15 Recent Posts
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.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
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.