小编Tom*_*ila的帖子

MissingPluginException(在通道 plugins.flutter.io/firebase_core 上找不到方法 Firebase#initializeCore 的实现)在 Android 上

调用Firebase.initializeApp()我的颤振代码时出现上述错误。我遵循了这里的文档:https : //firebase.flutter.dev/docs

这是我的 pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^0.5.0
  cloud_firestore: ^0.14.0
  firebase_auth: ^0.18.0
  fl_chart: ^0.11.0
  snapping_sheet: ^2.0.0
  flutter_svg: ^0.18.0
  flutter_redux: ^0.6.0
  strings: ^0.1.2
  random_string: ^2.1.0
  redux_thunk: ^0.3.0
  #  firebase_crashlytics: ^0.1.4+1
  dotted_line: ^2.0.1

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter
Run Code Online (Sandbox Code Playgroud)

这是我的颤振代码:

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);

  final store = Store<AppState>(AppState.reducer, initialState: AppState.initial(), middleware: [thunkMiddleware]);

  runApp(
    FutureBuilder( …
Run Code Online (Sandbox Code Playgroud)

android firebase flutter google-cloud-firestore flutter-dependencies

15
推荐指数
3
解决办法
9939
查看次数