Flurry initialization error with Android
I have the following error while initializing flurry in my application class:
04-27 10: 57: 47.360: W / dalvikvm (26744): VFY: unable to resolve static method 22939: Lcom / google / android / gms / ads / identifier / AdvertisingIdClient; .getAdvertisingIdInfo (Landroid / content / Context;) Lcom / google / android / gms / ads / identifier / AdvertisingIdClient $ Info; 04-27 10: 57: 47.370: W / dalvikvm (26744): VFY: unable to resolve virtual method 22937: Lcom / google / android / gms / ads / identifier / AdvertisingIdClient $ Info; .getId () Ljava / lang / String ; 04-27 10: 57: 47.370: W / dalvikvm (26744): VFY: unable to resolve virtual method 22938: Lcom / google / android / gms / ads / identifier / AdvertisingIdClient $ Info; .isLimitAdTrackingEnabled () Z 04-27 10: 57: 47.510: W / System.err (26744): java.lang.NoClassDefFoundError: com.google.android.gms.ads.identifier.AdvertisingIdClient 04-27 10: 57: 47.510: W / System.err (26744): at com.flurry.sdk.fe.n (SourceFile: 239) 04-27 10: 57: 47.515: W / System.err (26744): at com.flurry.sdk.fe.j (SourceFile: 191) 04-27 10: 57: 47.515: W / System.err (26744): at com.flurry.sdk.fe.i (SourceFile: 154) 04-27 10: 57: 47.515: W / System.err (26744): at com.flurry.sdk.fe.a (SourceFile: 40) 04-27 10: 57: 47.520: W / System.err (26744): at com.flurry.sdk.fe $ 1.safeRun (SourceFile: 83) 04-27 10: 57: 47.520: W / System.err (26744): at com.flurry.sdk.hq.run (SourceFile: 49) 04-27 10: 57: 47.525: W / System.err (26744): at android.os.Handler.handleCallback (Handler.java:615) 04-27 10: 57: 47.530: W / System.err (26744): at android.os.Handler.dispatchMessage (Handler.java:92) 04-27 10: 57: 47.530: W / System.err (26744): at android.os.Looper.loop (Looper.java:137) 04-27 10: 57: 47.530: W / System.err (26744): at android.os.HandlerThread.run (HandlerThread.java:60) 04-27 10: 57: 47.570: W / System.err (26744): java.lang.NullPointerException 04-27 10: 57: 47.570: W / System.err (26744): at com.flurry.sdk.ce.a (SourceFile: 52) 04-27 10: 57: 47.570: W / System.err (26744): at com.flurry.sdk.go $ 3.safeRun (SourceFile: 59) 04-27 10: 57: 47.570: W / System.err (26744): at com.flurry.sdk.hq.run (SourceFile: 49) 04-27 10: 57: 47.570: W / System.err (26744): at android.os.Handler.handleCallback (Handler.java:615) 04-27 10: 57: 47.575: W / System.err (26744): at android.os.Handler.dispatchMessage (Handler.java:92) 04-27 10: 57: 47.575: W / System.err (26744): at android.os.Looper.loop (Looper.java:137) 04-27 10: 57: 47.575: W / System.err (26744): at android.os.HandlerThread.run (HandlerThread.java:60)
Then after that all my events and sessions are discarded and not displayed on the elevator panel.
I am using FlurryAnalytics-5.3.0.jar and FlurryAds-5.3.0.jar.
Initialization code:
FlurryAgent.setLogEnabled(BuildConstants.IS_RUNNING_DEBUG);
if (BuildConstants.IS_RUNNING_DEBUG) {
FlurryAgent.setLogLevel(Log.VERBOSE);
} else {
FlurryAgent.setLogLevel(Log.ERROR);
}
FlurryAgent.setLogEvents(true);
FlurryAgent.setReportLocation(true);
FlurryAgent.init(context, ImplementationUtils.getAnalyticsKey());
EDIT: I added the following code to the manifest:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
and now I have this error \ warning:
04-27 11: 30: 04.125: W / System.err (28320): at com.flurry.sdk.fe.n (SourceFile: 239) 04-27 11: 30: 04.130: W / System.err (28320): at com.flurry.sdk.fe.j (SourceFile: 191) 04-27 11: 30: 04.130: W / System.err (28320): at com.flurry.sdk.fe.i (SourceFile: 154) 04-27 11: 30: 04.140: W / System.err (28320): at com.flurry.sdk.fe.a (SourceFile: 40) 04-27 11: 30: 04.140: W / System.err (28320): at com.flurry.sdk.fe $ 1.safeRun (SourceFile: 83) 04-27 11: 30: 04.140: W / System.err (28320): at com.flurry.sdk.hq.run (SourceFile: 49) 04-27 11: 30: 04.185: W / System.err (28320): at com.flurry.sdk.ce.a (SourceFile: 52) 04-27 11: 30: 04.185: W / System.err (28320): at com.flurry.sdk.go $ 3.safeRun (SourceFile: 59) 04-27 11: 30: 04.185: W / System.err (28320): at com.flurry.sdk.hq.run (SourceFile: 49) 04-27 11: 30: 07.235: W / FlurryAgent (28320): Flurry session created for context: com.foo 04-27 11: 30: 07.290: W / dalvikvm (28320): Link of class 'Lcom / flurry / sdk / bp;' failed 04-27 11: 30: 07.290: E / dalvikvm (28320): Could not find class 'com.flurry.sdk.bp', referenced from method com.flurry.sdk.bq.a 04-27 11: 30: 07.290: W / dalvikvm (28320): VFY: unable to resolve new-instance 2608 (Lcom / flurry / sdk / bp;) in Lcom / flurry / sdk / bq; 04-27 11: 30: 07.290: W / dalvikvm (28320): Link of class 'Lcom / flurry / sdk / br;' failed 04-27 11: 30: 07.290: E / dalvikvm (28320): Could not find class 'com.flurry.sdk.br', referenced from method com.flurry.sdk.bq.a 04-27 11: 30: 07.290: W / dalvikvm (28320): VFY: unable to resolve new-instance 2610 (Lcom / flurry / sdk / br;) in Lcom / flurry / sdk / bq; 04-27 11: 30: 07.295: W / dalvikvm (28320): Link of class 'Lcom / flurry / sdk / bp;' failed 04-27 11: 30: 07.300: W / dalvikvm (28320): Link of class 'Lcom / flurry / sdk / br;' failed
+3
source to share
2 answers
Put these two lines in your application's onCreate () method
// configure Flurry
FlurryAgent.setLogEnabled(false);
// init Flurry
FlurryAgent.init(this,FLURRY_API_KEY);
This works great for me. Just make sure you are using the correct FLURRY_API_KEY. This works for Google Analytics.
-1
source to share