Before we go to adding Interstitial Ads let's first take care of the error notification in the DesktopLauncher.java file (located in the SRC folder of your desktop project). Your DesktopLauncher should look like this:
When we added the constructor to our game's main class (MyGdxGame in the Core project) we specified that an AdsController needs to be passed to it when we create a new MyGdxGame object. Here on line 8 when we create that new instance of MyGdxGame we're not passing anything to the constructor. We can take care of the error by passing a null argument to the constructor like this:
And then in the constructor of MyGdxGame I'll check whether the AdsController is passed (from the Android project) or a null argument is passed (from the Desktop project). When I run my project on my the Desktop I actually don't want to run the (Android related) code to display AdMob ads and I can do that by creating and referring to a DummyAdsController Interface instead of the AdsController.
Let me show you how to do that:
In the next section: Interstitial Ads!