Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flurry Analytics crashing when "Run" in Android emulator but not when "Debugged" in emulator

As per the title, I have an application which makes use of the Flurry Analytics library for Android. I've followed their basic steps to integrate analytics into my app. If I Debug my app in the Android emulator, everything works fine. If I Run my app in the Android emulator on the other hand, Flurry seems to crash it. Here is the output from logcat:

10-19 16:03:14.004: E/AndroidRuntime(385): FATAL EXCEPTION: FlurryAgent  
10-19 16:03:14.004: E/AndroidRuntime(385): java.lang.NullPointerException  
10-19 16:03:14.004: E/AndroidRuntime(385):  at com.flurry.android.FlurryAgent.b(SourceFile:2188)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at   com.flurry.android.FlurryAgent.a(SourceFile:68)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at com.flurry.android.e.run(SourceFile:1420)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at   android.os.Handler.handleCallback(Handler.java:587)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at android.os.Handler.dispatchMessage(Handler.java:92)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at android.os.Looper.loop(Looper.java:123)  
10-19 16:03:14.004: E/AndroidRuntime(385):  at android.os.HandlerThread.run(HandlerThread.java:60)

Curiously, this problem only seems to occur when I run in an Android 2.2 (Froyo) Virtual Device, whereas if I run it in an Android 4.1 Virtual Device, it is fine. Unfortunately I don't have immediate access to a real Android 2.2 device to test on.

Can anyone suggest what might be going wrong?

like image 897
Bryce Thomas Avatar asked Oct 06 '22 06:10

Bryce Thomas


3 Answers

It was a similar problem on Flurry SDK, with version 3.0.4;
Flurry library crashes on start both emulators and real devices with android version < 2.3 (I checked it on real device 2.2, and 2.1, 2.2 - emulators).

Fixed on release 3.0.5, see changelog:

Version 3.0.5- 10/26/2012
● added fix to prevent crashing of bad phone ids in AndroidSDK 2.2

like image 193
Sash0k Avatar answered Oct 19 '22 11:10

Sash0k


It seems that there is some sort of problem with the latest Flurry SDK. The exception shows up on real devices too (android 2.2 and release only).

What I did was to use an older version of the Flurry SDK which works fine.

like image 30
Bogdan Dodoiu Avatar answered Oct 19 '22 09:10

Bogdan Dodoiu


I also had this issue, but it seems to have been fixed with the release of the sdk 3.0.5

like image 1
donden1 Avatar answered Oct 19 '22 11:10

donden1