Version numbers are not quite part of the code. I'd rather say it is meta information and ideally shouldn't be in the repository with the source code. It should be added only in the build phase. But the world isn't an ideal place, so sometimes you need to have the version hard-coded.
For these cases, it is expected to have version conflicts when merging different versions. This is fine and shouldn't make you uncomfortable.
In these cases, I would minimize the number of places where the version is stored. Ideally, it is only in one specific file that contains only the version and nothing else.
You can solve this conflictthese conflicts manually, but the better decision would be to write some custom merge driver to solve thesethis type of conflicts automatically. Example of such a driver is in this answer.