简体   繁体   English

Flurry 集成错误:找不到符号方法 init()

[英]Flurry Integration Error: Cannot find symbol method init()

In my application class, in OnCreate(), I've added the following bit of code:在我的应用程序 class 中,在 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);

Also, in the gradle, I've added implementation like,此外,在 gradle 中,我添加了类似的实现,

implementation 'com.flurry.android:analytics:12.11.0'

Now, when I'm trying to add FlurryAgent.init(Context, String) in a method, I'm receiving the error "cannot find symbol method init(Context, String). The same is the case with FlurryAgent.setLogEnabled(True).现在,当我尝试在方法中添加 FlurryAgent.init(Context, String) 时,我收到错误“找不到符号方法 init(Context, String)。FlurryAgent.setLogEnabled(True )。

This is the first time I'm working with Flurry.这是我第一次使用 Flurry。 Can anyone please guide me?谁能指导我?

FlurryAgent.init(Context, String) method was removed from Flurry SDK. FlurryAgent.init(Context, String)方法已从 Flurry SDK 中删除。 You should use FlurryAgent.Builder()...build(Context, String) to initialize Flurry.您应该使用FlurryAgent.Builder()...build(Context, String)来初始化 Flurry。

Looks like you already use FlurryAgent.Builder.build here.看起来您已经在这里使用FlurryAgent.Builder.build You don't need to use FlurryAgent.init again.您无需再次使用FlurryAgent.init

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

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