使用ProGuard无法获得Ad,Flurry 5.3

R00*_*0We 2 android proguard flurry

flurry在Google Play中发布构建应用时,我的应用无法获得广告ProGuard.如果我运行应用程序没有ProGuard一切正常.我启用Log和flurrySDK写下一个信息:

02-20 16:31:09.765    8953-8953/? D/FlurryAdServingApp? fetchAndDisplay: Banner
02-20 16:31:14.885    8953-8953/? D/FlurryAdServingApp? Failed 20
02-20 16:31:17.960    8953-9041/? W/System.err? java.lang.ClassCastException: com.flurry.sdk.it cannot be cast to com.flurry.android.impl.ads.protocol.v13.AdUnit
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.ci$4.a(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.ci$4.a(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gg.o(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gg.d(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gg$1.a(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gh.o(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gh.a(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.gg.a(Unknown Source)
02-20 16:31:17.960    8953-9041/? W/System.err? at com.flurry.sdk.hk.run(Unknown Source)
Run Code Online (Sandbox Code Playgroud)

我不明白他为什么写下未知来源,如果在proguard-project.txt我写下:

-keep class com.flurry.** { *; }
-dontwarn com.flurry.**
-keepattributes *Annotation*,EnclosingMethod
-keepclasseswithmembers class * {
  public <init>(android.content.Context, android.util.AttributeSet, int);
}

# Google Play Services library
-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;
}
#If you are using the Google Mobile Ads SDK, add the following:
# Preserve GMS ads classes
-keep class com.google.android.gms.ads.** { *;
}
-dontwarn com.google.android.gms.ads.**


#If you are using the InMobi SDK, add the following:
# Preserve InMobi Ads classes
-keep class com.inmobi.** { *;
}
-dontwarn com.inmobi.**
#If you are using the Millennial Media SDK, add the following:
# Preserve Millennial Ads classes
-keep class com.millennialmedia.** { *;
}
-dontwarn com.millennialmedia.**
Run Code Online (Sandbox Code Playgroud)

请帮我.

use*_*110 5

我有完全相同的错误消息,"W/System.err:java.lang.ClassCastException:com.flurry.sdk.it无法强制转换为com.flurry.android.impl.ads.protocol.v13.AdUnit".

我联系Flurry支持,发送电子邮件至support@flurry.com,并在2个工作日后(今天),他们回答说:

感谢您与Flurry支持联系.在你的proguard配置中,你能否改变第3行:

-keepattributes *Annotation*,EnclosingMethod
Run Code Online (Sandbox Code Playgroud)

-keepattributes *Annotation*,EnclosingMethod,Signature
Run Code Online (Sandbox Code Playgroud)

请注意添加"签名".请尝试这个新配置,让我们知道它是否有效.

我对Proguard做了调整,Flurry广告现在似乎正在运作.总结一下,Flurry的Proguard配置如下:

#Flurry
-keep class com.flurry.** { *; }
-dontwarn com.flurry.**
-keepattributes *Annotation*,EnclosingMethod,Signature
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}
# Preserve Flurry mediation classes for DFP/AdMob Ads
-keep public class com.google.ads.mediation.flurry.**
Run Code Online (Sandbox Code Playgroud)

作为参考,我使用的是FlurryAds-5.3.0.jar,FlurryAnalytics-5.3.0.jar和flurryAndroidDFPandAdMobMediationAdapter-5.0.0.r1.jar