I added this in my build.gradle(mopub-sdk) file
buildTypes {
release {
runProguard true;
proguardFiles getDefaultProguardFile('proguard-android.txt'), file('proguard.txt')
}
}
My proguard.txt file is
# Keep public classes and methods.
-keepclassmembers class com.mopub.** { public *; }
-keep public class com.mopub.**
-keep class com.mopub.mobileads.**{*;}
-keep public class com.mopub.mobileads.MoPubInterstitial
-keep public class com.mopub.mobileads.MoPubView
-keep public class android.webkit.JavascriptInterface {}
# Keep interfaces
-keep interface com.mopub.mobileads.MoPubInterstitial.InterstitialAdListener
-keep interface com.mopub.mobileads.MoPubView.BannerAdListener
# Explicitly keep any custom event classes in any package.
-keep class * extends com.mopub.mobileads.CustomEventBanner {}
-keep class * extends com.mopub.mobileads.CustomEventInterstitial {}
-keep class * extends com.mopub.nativeads.CustomEventNative {}
# Support for Android Advertiser ID.
-keep class com.google.android.gms.common.GooglePlayServicesUtil {*;}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {*;}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {*;}
But upon building, I get this error:
Error:(33, 45) error: cannot find symbol class InterstitialAdListener
Error:(35, 37) error: cannot find symbol class BannerAdListener
and a couple of others but most of them are related to the above two. What could be wrong here?