0

创建了全新的颤振项目,除了添加到 yaml 之外没有任何变化:

dependencies:
  flutter:
    sdk: flutter
  firebase_core: "0.2.3"

在“包获取”之后,重建项目在 GeneratedPluginRegistrant 中给出错误

**Error:(4, 40) java: package io.flutter.plugins.firebase.core does not exist
Error:(14, 5) java: cannot find symbol
  symbol:   variable FirebaseCorePlugin
  location: class io.flutter.plugins.GeneratedPluginRegistrant
Information:javac 1.8.0_131 was used to compile java sources
Information:5/30/2018 7:18 AM - Compilation completed with 2 errors and 0 warnings in 2 s 101 ms**

扑医生

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.4.4, on Microsoft Windows [Version 10.0.17134.48], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2018.1)
[!] VS Code, 64-bit edition (version 1.23.1)
[√] Connected devices (1 available)
4

2 回答 2

0

^在版本声明中缺少符号。正确的方法是,

firebase_core: "^0.2.3"

于 2018-05-30T13:15:21.573 回答
0

java: package io.flutter.plugins.firebase.core 不存在 这是一个 java 类路径错误。只需添加到类路径

于 2018-09-20T14:41:17.717 回答