Does applying for a patent first make it more difficult to publish (or vice versa)? After working on a project some times, some results are obtained and we decide to publish it. I know publishing a paper and applying a patent can actually happen in the same time, but is there any difference for their priority? 

For example, if I obtain a patent first for my results, will it make it more difficult to publish the same results in academic paper, or vice versa? 

If I do it together, will there be any conflict between them?
In the U.S., you may file a patent application up to one year after the invention is described in a publication, in public use, or on sale. So if you publish something on your invention and also wish to patent it, you only have one year from the date of publication to apply for the patent. Similar rules may apply in other countries; it's a good idea to consult a lawyer.

There is no conflict the other way around; you can publish after the patent application (or at the same time) without issues.