在android中添加flurry SDK后,Millennial Media无法正常工作

时间:2016-01-27 06:41:54

标签: android flurry millennial-media

我正在尝试在同一个Android应用中使用Millennial Media和Flurry SDK。 两者都是单独工作(单独测试),但在尝试初始化Millennial Media SDK时显示错误,并且包含两个SDK。

在以下行中显示错误,

MMSDK.initialize(this);

在我添加的proguard文件中,

-keep class com.flurry.** { *; }
-dontwarn com.flurry.**
-keepattributes *Annotation*,EnclosingMethod,Signature
-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.**

在logcat中显示错误, enter image description here

1 个答案:

答案 0 :(得分:0)

你的课程太多了。在项目gradle中启用multidex。