react-native-firebase install - 包io.invertase.firebase不存在?

时间:2017-12-05 21:11:54

标签: react-native-firebase

在我的项目中运行“react-native run-android”时遇到以下问题。我按照正常情况经历了react-native-firebase,但在这种情况下,我无法看到我可能做错了什么?

type="text/markdown"

MainApplication.java例如:

:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:11: error: package io.invertase.firebase does not exist
import io.invertase.firebase.RNFirebasePackage;
                            ^
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:12: error: package io.invertase.firebase.auth does not exist
import io.invertase.firebase.auth.RNFirebaseAuthPackage;
                                 ^
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:13: error: package io.invertase.firebase.firestore does not exist
import io.invertase.firebase.firestore.RNFirebaseFirestorePackage;
                                      ^
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:30: error: cannot find symbol
          new RNFirebasePackage(),
              ^
  symbol: class RNFirebasePackage
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:31: error: cannot find symbol
          new RNFirebaseAuthPackage(),
              ^
  symbol: class RNFirebaseAuthPackage
/source/myapp/android/app/src/main/java/com/gctodo/MainApplication.java:32: error: cannot find symbol
          new RNFirebaseFirestorePackage()
              ^
  symbol: class RNFirebaseFirestorePackage
6 errors
:app:compileDebugJavaWithJavac FAILED

3 个答案:

答案 0 :(得分:3)

似乎缺少RNFirebasePackage,在编译步骤中无法找到它。

尝试运行

react-native link

安装后,然后清理然后运行构建。

答案 1 :(得分:0)

运行react-native链接对我不起作用。我不得不删除 android ios 项目文件夹,然后运行

react-native eject

重新创建了ios和android文件夹。我现在能够运行构建。

答案 2 :(得分:0)

对于其他卡在这里的人,我需要做Dim ttsbot set sapi = wscript.createobject("SAPI.Spvoice") Sapi.speak "*username here*"