Working as an Academic researcher difficulties What do you do if you have to perform research in a field that you didn't like, as I'm currently passionate about computer vision stuff, but my research is about Android security. More than that the supervisor seems to lack enough knowledge related to the field and he pushes me to find something before the finishing date (we have just 2 months left since it is a funded project).
Thanks.
If you are a student, then you have, I think, two options. Struggle through the project to help assure your degree. Or drop it, which might require getting a different advisor or even moving to a new institution. Both of those have a downside, and only you can determine which is worse. If you only have a short time to finish your degree, then the first might be preferable. But if it is a long way off, then  consider the second (with all of its implications).
The project is the responsibility of the PI, not yourself. So, think about how it meets your goals or fails to do so.
If you are a post doc then you may be stuck, depending on your contract and the need to have a good recommendation from the PI to be able to move on. But do move on as soon as possible.
If you are faculty already then I don't see much downside to just leaving, provided that it is financially feasible.
But, only you can balance the ups and downs of this. Think long term about your career, however, not just about the short term pain.