Tried the code you posted. Works for me, it builds.
Which version of Solar2D are you trying this? If you are using late-Corona versions like 3582, did you activate the AdMob plugin on Corona marketplace(https://marketplace.coronalabs.com/corona-plugins/admob)?
If you are using the new, offline releases from GitHub you should take a look at this thread for plugins -> How do I update my plugins?