0

After I successfully integrated flurry SDK into the library by using this code in my build.gradle file.

compile 'com.flurry.android:analytics:6.2.0'

I created java Class to integrate my API Key into my code, but I faced this probleme and I have no clue what should I do to successfully integrate it

-cannot resolve symbol FlurryAgent

-cannot resolve symbol flurrylistener

image of the error

PS: I'm new to Flurry analytics and Android Studio

Community
  • 1
  • 1
Neo
  • 149
  • 1
  • 10
  • What is the error? – jhhoff02 Feb 20 '17 at 12:56
  • cannot resolve symbol flurrylistener + cannot resolve symbol FlurryAgent – Neo Feb 20 '17 at 13:31
  • Is flurryListener defined in the file somewhere? – Joel Duggan Feb 20 '17 at 13:49
  • I don't know, I just followed their 2 steps flurry integration tuto and it gave me those 2 errors , also they said :If you're shipping an app, insert a call to FlurryAgent.build(Context, String) in your Application class, passing reference to your application Context and your project's API key , and I don't know if I did it correctly or not . – Neo Feb 20 '17 at 14:03

3 Answers3

0

For now just remove the withListener() line. It's not necessary to initialize Flurry. Once you have your integration working, you can go back and set it up if you want, I've found it only to be necessary if you need to send events before Flurry completes initialization.

Joel Duggan
  • 215
  • 1
  • 7
  • Ok thank you, and what should I do with the FlurryAgent problem ? – Neo Feb 20 '17 at 14:24
  • Is it still giving an error? If it is, them maybe the Builder() method was added in a later SDK version, trying using this in your build.gradle: compile 'com.flurry.android:analytics:6.4.2' – Joel Duggan Feb 20 '17 at 14:34
0

Flurry is working to get this corrected. Joel Duggan is correct the listener is "only necessary if you need to send events before Flurry completes initialization."

We will be removing this line of code from the basic instructions:

.withListener(flurryListener)

And here is the correct syntax for those who need it:

import com.flurry.android.FlurryAgentListener;

....

FlurryAgent.Builder() .withLogEnabled(true) .withListener(new FlurryAgentListener() { @Override public void onSessionStarted() { // Session handling code } }) .build(this, 'your_api_key');

Hunter
  • 579
  • 3
  • 8
0

I was facing same problem, I have updated gradle and my problem is solved. Use latest gradle as follows,

//Flurry compile 'com.flurry.android:analytics:7.0.0@aar'

for more reference use this url

Sandeep
  • 766
  • 5
  • 16