flutter 错误:选择器“setScreenName:screenClass:”没有已知的类方法

lrl1mhuk  于 2023-02-16  发布在  Flutter
关注(0)|答案(3)|浏览(115)

嗨,我正在尝试构建flutter应用程序,但编译器返回错误:

Command MergeSwiftModule failed with a nonzero exit code
/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.1.1/ios/Classes/FLTFirebaseAnalyticsPlugin.m:49:19: error: no known class method for selector 'setScreenName:screenClass:'
    [FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

我已经尝试谷歌尽我所能,但我不知道为什么它不工作,我的扑动是在最新版本的频道稳定:2.2.3
我试过-flutter clean -pod update -pod安装-repo-update -pod安装-sudo gem安装cocopods
请帮助我会尽量提供所需的任何其他信息。谢谢

5uzkadbs

5uzkadbs1#

如果react-native中出现相同错误,则在RNFirebaseAnalytics.m文件中,更新以下代码行:

[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

[FIRAnalytics logEventWithName:kFIREventScreenView parameters: @{kFIRParameterScreenName: screenName}];
cgfeq70w

cgfeq70w2#

Upgrade firebase_analytics to latest version
flutter clean
remove Podfile.lock
pod update
flutter run
qlvxas9a

qlvxas9a3#

我在RNFirebaseAnalytics. m文件中遇到了同样的问题,更新以下代码行:
[FIR分析设置屏幕名称:屏幕名称屏幕类别:屏幕类别概述];
致:-
[FIRAnalytics日志事件名称:kFIREventScreenView参数:@{kFIREVENT屏幕视图:屏幕名称}];

相关问题