简体   繁体   English

Flurry Analytics集成错误

[英]Flurry Analytics Integration Errors

After I successfully integrated flurry SDK into the library by using this code in my build.gradle file. 通过使用build.gradle文件中的此代码成功将flurry SDK集成到库中之后。

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 我创建了Java类以将我的API密钥集成到我的代码中,但是我遇到了这个问题,我不知道要成功集成它应该怎么做。

-cannot resolve symbol FlurryAgent -无法解析符号FlurryAgent

-cannot resolve symbol flurrylistener -无法解析符号flurrylistener

错误图片

PS: I'm new to Flurry analytics and Android Studio PS:我是Flurry Analytics和Android Studio的新手

For now just remove the withListener() line. 现在,只需删除withListener()行。 It's not necessary to initialize Flurry. 不必初始化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. 集成工作完成后,可以根据需要返回并进行设置,我发现只有在需要在Flurry完成初始化之前发送事件的情况下才需要进行设置。

Flurry is working to get this corrected. Flurry正在努力纠正此问题。 Joel Duggan is correct the listener is "only necessary if you need to send events before Flurry completes initialization." 乔尔·杜根(Joel Duggan)正确的是,侦听器是“仅在需要在Flurry完成初始化之前发送事件的情况下才是必需的”。

We will be removing this line of code from the basic instructions: 我们将从基本说明中删除以下代码行:

.withListener(flurryListener) .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');

I was facing same problem, I have updated gradle and my problem is solved. 我遇到了同样的问题,我更新了gradle,问题解决了。 Use latest gradle as follows, 使用最新的gradle,如下所示:

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

for more reference use this url 有关更多参考,请使用此网址

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM