[英]Flurry integrations with Android App gives an error “Could not find class 'com.flurry.sdk.i', referenced from method com.flurry.sdk.hu.a”
這是我到目前為止所嘗試的:
public class ScoreUpApp extends Application {
private static ScoreUpApp scoreUpDataCache;
public static final String TAG = "MyApp";
@Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
// configure Flurry
FlurryAgent.setLogEnabled(true);
// init Flurry
FlurryAgent.init(this, "V88JVYGFF7QX5D9RYZG2");
}
}
這就是我在Logcat中得到的錯誤:
03-17 14:06:41.924: E/dalvikvm(30175): Could not find class 'com.flurry.sdk.i', referenced from method com.flurry.sdk.hu.a
03-17 14:31:36.694: W/dalvikvm(31798): VFY: unable to resolve const-class 2065 (Lcom/flurry/sdk/i;) in Lcom/flurry/sdk/hu;
謝謝。
如果你只是使用FlurryAnalytics-XXXjar沒有FlurryAds-XXXjar會發生此警告/錯誤信息。 如果您對廣告不感興趣,可以忽略該錯誤,因為它只是SDK的內部錯誤,不會影響您的應用。
但是,如果您已將廣告庫作為依賴項包含在內,並且仍然看到此錯誤,那么這是因為Proguard正在剝離所需的類。 確保您的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.**
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.