when I add an expansion code to my activity, it gives a message that flurry sdk has not been initialized, checked by ive to make sure that the library is added to the project library, below is my code and logcat, it also has a flurry of imports into activity
@Override
protected void onStart() {
super.onStart();
FlurryAgent.onStartSession(this,"YOUR_API_KEY" );
FlurryAgent.setLogEnabled(true);
FlurryAgent.setLogEvents(true);
FlurryAgent.setLogLevel(Log.VERBOSE);
}
@Override
protected void onStop() {
super.onStop();
FlurryAgent.onEndSession(this);
}
Logcat
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stephenh.daytrack.daytrackstephenh/com.stephenh.daytrack.daytrackstephenh.PageActivities.Exercises}: java.lang.IllegalStateException: Flurry SDK must be initialized before starting a session
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2263)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5212)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Flurry SDK must be initialized before starting a session
at com.flurry.android.FlurryAgent.onStartSession(SourceFile:328)
at com.stephenh.daytrack.daytrackstephenh.PageActivities.Exercises.onStart(Exercises.java:61)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1172)
source
share