admob ads are not shown with pro guard

Add this to your proguard:

-keep class com.google.ads.** # Don't proguard AdMob classes
-dontwarn com.google.ads.** # Temporary workaround for v6.2.1. It gives a warning that you can ignore

EDIT 2020:

For some time now, the Google Mobile Ads SDK has distributed its own proguard rules that get manifest merged into your app, so you don't need to add anything yourselves. The merged rules also keep around methods from third-party mediation adapters that are needed to make mediation work.


Proguard Rules for Admob in Android

-keep public class com.google.android.gms.ads.**{
   public *;
}

# For old ads classes
-keep public class com.google.ads.**{
   public *;
}

# For mediation
-keepattributes *Annotation*

# Other required classes for Google Play Services
# Read more at http://developer.android.com/google/play-services/setup.html
-keep class * extends java.util.ListResourceBundle {
   protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
   public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
   @com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
   public static final ** CREATOR;
}

From the docs:

To safely use ProGuard with Google Mobile Ads, add the following to your ProGuard config:

-keep public class com.google.android.gms.ads.** {
    public *;
}

-keep public class com.google.ads.** {
    public *;
}

This will prevent all public methods on public classes from being obfuscated.

If you use AdMob Mediation with other ad networks, you should keep public methods from public classes for each SDK and adapter library as well.