A simple urinary tract infection is extremely uncommon in a male dog, especially a fairly young, otherwise healthy, male dog.
So odds are an antibiotic alone is not going to be enough to help him.
There are many reasons to have stranguria or difficulty passing urine.
We often think of an infection but a simple urinary infection rarely causes such severe inflammation that males have trouble passing urine. We must also consider co-existing problems like crystals or stones in the urinary tract, masses on the penis or prepuce or in the urinary or reproductive tract are possible causes.
If he is an un-neutered male prostatic cysts or an abscess or a prostatic tumor are possible causes as well.
I know this isn't likely what you want to hear but your fellow needs to see his veterinarian.
As long as he is eating and drinking, and still able to pass some urine this isn't an immediate emergency.
But any time we see a male having trouble passing urine a complete blockage is possible, and that is an immediate emergency, because it can lead to kidney failure, electrolyte imbalances and death. As such he should be examined as soon as possible, ideally tomorrow morning if he continues to be able to pass at least some urine.
Best of luck with your fellow, please let me know if you have any further questions.