Before loading ads, have your app initialize the Mobile Ads SDK by calling MobileAds.initialize() with your AdMob App ID. This only needs to be done once, ideally at app launch. You can find your app's App ID in the AdMob UI.

Here's an example of how to call the initialize() method in an Activity:

Example (excerpt)

package ...
import ...

public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
// Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713
MobileAds.initialize(this, "YOUR_ADMOB_APP_ID");