Riolu is a baby Pokemon. Baby Pokemon can not be bred. You need to evolve both of them into Lucario before it will be able to breed.
Riolu evolves by having a friendship above 220 and then leveling up during day time. So give it a soothe bell put it first in your party and ride around on your bike for a while with each.
Edit by Dragoon: If you give your Riolu vitamins(protein, calcium, etc.) and battle with it(make sure it wins, because if it faints, the friendship goes down), it's friendship will skyrocket.