问题描述
在我的应用程序类的 OnCreate() 中,我添加了以下代码:
new FlurryAgent.Builder()
.withDataSaleOptOut(false) //CCPA - the default value is false
.withCaptureUncaughtExceptions(true)
.withIncludeBackgroundSessionsInMetrics(true)
.withLogLevel(Log.VERBOSE)
.withPerformanceMetrics(FlurryPerformance.ALL)
.build(context,API_KEY);
此外,在 gradle 中,我添加了类似的实现,
implementation 'com.flurry.android:analytics:12.11.0'
现在,当我尝试在方法中添加 FlurryAgent.init(Context,String) 时,我收到错误“找不到符号方法 init(Context,String)。FlurryAgent 的情况也是如此。 setLogEnabled(True)。
这是我第一次使用 Flurry。任何人都可以指导我吗?
解决方法
FlurryAgent.init(Context,String)
方法已从 Flurry SDK 中删除。您应该使用 FlurryAgent.Builder()...build(Context,String)
来初始化 Flurry。
您似乎已经在这里使用了 FlurryAgent.Builder.build
。您无需再次使用 FlurryAgent.init
。