我有如下代码,最初我将此代码用于 iOS 和 Android 应用程序,现在我希望该应用程序在网络上运行,但是当我运行时出现此错误
runZonedGuarded:在我的根区域中捕获错误。pluginConstants['isCrashlyticsCollectionEnabled'] != null 不是 true
有人建议使用kisweb,我已经使用了它,但我仍然遇到同样的错误,请帮忙,这是我的代码
void main() async {
WidgetsFlutterBinding.ensureInitialized();
if(!kIsWeb) {
await Firebase.initializeApp();
}
runZonedGuarded(() async {
if (kDebugMode) {
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(false);
}else{
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
}
runApp(App(
authenticationRepository: AuthenticationRepository(),
userRepository: UserRepository(),
));
}, (error, stackTrace) async {
print('runZonedGuarded: Caught error in my root zone. $error');
});
}
Run Code Online (Sandbox Code Playgroud)
索引.html
<!DOCTYPE html>
<html>
<head>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-analytics.js"></script> …
Run Code Online (Sandbox Code Playgroud) 我的文件夹中有文件:coverage/lcov.info
我将在 CI Gitlab 中使用 codecov uploader version 0.2.4 上传文件(使用 flutter),但出现错误
There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?请帮忙