Flurry Agent Crashing App - Android Native Extension
I am creating an Android Native Extension for my game. I need to be able to access a 3rd party sdk (for which I have the source files) that was written in java.
The sdk uses Flurry Analytics for recording events and it is integrated into the sdk source code.
I have managed to get a working ane that can communicate back and forth between my game and the java sdk, however, when the sdk tries to initialize it's reporting class, the app "initialization" method that is executing terminates prematurely. It doesn't crash the app, and no exceptions are reported in the code, but since the method terminates prematurely, all the initialization code that follows doesn't get run, thus blowing up the entire sdk.
In the Android Debug Monitor LogCat I get the following output when the reporting class is created:
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.onEndSession, referenced from method com.bigfishgames.bfglib.bfgReporting.destroy
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1973: Lcom/flurry/android/FlurryAgent;.onEndSession (Landroid/content/Context;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0011
12-28 15:05:26.488: D/dalvikvm(1776): VFY: dead code 0x0014-0016 in Lcom/bigfishgames/bfglib/bfgReporting;.destroy ()V
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.onStartSession, referenced from method com.bigfishgames.bfglib.bfgReporting.sharedInstance
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1975: Lcom/flurry/android/FlurryAgent;.onStartSession (Landroid/content/Context;Ljava/lang/String;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0067
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.onError, referenced from method com.bigfishgames.bfglib.bfgReporting._logError
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1974: Lcom/flurry/android/FlurryAgent;.onError (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0004
12-28 15:05:26.488: D/dalvikvm(1776): VFY: dead code 0x0007-0007 in Lcom/bigfishgames/bfglib/bfgReporting;._logError (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.onError, referenced from method com.bigfishgames.bfglib.bfgReporting._logError
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1974: Lcom/flurry/android/FlurryAgent;.onError (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0000
12-28 15:05:26.488: D/dalvikvm(1776): VFY: dead code 0x0003-0003 in Lcom/bigfishgames/bfglib/bfgReporting;._logError (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.logEvent, referenced from method com.bigfishgames.bfglib.bfgReporting.logEvent
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1971: Lcom/flurry/android/FlurryAgent;.logEvent (Ljava/lang/String;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0000
12-28 15:05:26.488: D/dalvikvm(1776): VFY: dead code 0x0003-0003 in Lcom/bigfishgames/bfglib/bfgReporting;.logEvent (Ljava/lang/String;)V
12-28 15:05:26.488: I/dalvikvm(1776): Could not find method com.flurry.android.FlurryAgent.logEvent, referenced from method com.bigfishgames.bfglib.bfgReporting.logEvent
12-28 15:05:26.488: W/dalvikvm(1776): VFY: unable to resolve static method 1972: Lcom/flurry/android/FlurryAgent;.logEvent (Ljava/lang/String;Ljava/util/Map;)V
12-28 15:05:26.488: D/dalvikvm(1776): VFY: replacing opcode 0x71 at 0x0000
12-28 15:05:26.488: D/dalvikvm(1776): VFY: dead code 0x0003-0003 in Lcom/bigfishgames/bfglib/bfgReporting;.logEvent (Ljava/lang/String;Ljava/util/Map;)V
Then when the sdk source executes FlurryAgent.onStartSession, the java code stops executing and kicks all the way back out to the action script code.
I have done some reading and the only thing I found similiar was this:
Check the project properties Java build path then the order and export tab make sure the FlurryAgent.jar is selected.
In my project, I have the FlurryAgent.jar added as an external jar in the libraries, and in the order and export, it is at the top of the list, just under the FlashRuntimeExtension.jar and it is checked.
To create my ane jar file, I am right clicking on the project, selecting export, I then select Java/JAR file.
Export generated class files and resources is checked
compress the contents of the jar file is checked
add directory entries is checked
and all files and folders in my project are checked.
I opened the final .jar file in winrar and the FlurryAgent.jar file is libs folder along with the FlashRuntimeExtensions.jar
Does anyone know what I am doing wrong, or not including in the file apk (like some dependency I don't know about)?
I am using Eclipse for Mobile Developers Version: Juno Service Release 1 Build id: 20121004-1855 as my Java IDE for building the native extension jar file on Windows 7
I am building the ANE using Air 3.5.0.840
Using Flash Builder 4.6 to build the apk
Testing on a Sony Ericsson Xpeira Phone running Android 2.3.4
