The Serbian prime minister has announced his resignation amid nationwide protests over the deadly collapse of a railway station canopy, the BBC reported on Wednesday.