__ crashlytics.default.log不是函数

问题描述 投票:0回答:1

我使用react-native 0.60.5通过自动链接关注crashlytics/quick-start上的文档。

使用下面的代码(文档的精确副本),我得到了_crashlytics.default.log is not a function

import crashlytics from '@react-native-firebase/crashlytics';

function forceCrash() {
    crashlytics.log('Testing crash');
    crashlytics.crash();
}

我试图认为我不需要更改/ android /文件夹中的任何文件。

项目源代码在github repo上。

react-native crashlytics react-native-firebase
1个回答
0
投票

这是已修复的文档中的一个错误,将很快发布。正确用法应为:

crashlytics().log('...');
crashlytics().crash();
© www.soinside.com 2019 - 2024. All rights reserved.