I have all the materials to build/upgrade but the button is greyed out
If you see a small number of coins this is a display issue. Force close your game (double click the home button, press and hold the castle story icon, click the minus button, click the home button) then restart it. You'll see the correct items.
This was fixed in version 1.1.5