In Adapter class code, declare instance variables as shown below In Adapter class code, declare instance variables as shown below private int mAdPosition; private boolean mAdLoaded; private final String mApiKey; private LVDOBannerAd mAdView; private final LVDOAdSize mAdSize;