繁体   English   中英

将 flutter 项目克隆到另一台计算机时无法访问 firebase/firestore

[英]Cant access firebase/firestore when cloning flutter project to another computer

我已将我的项目上传到 github 并克隆到另一台计算机。 它编译正常,但无法访问 Firbase/firestore,因此我无法通过身份验证等正确使用此克隆项目。 当我将带有 firebase 的 flutter 应用程序克隆到另一台计算机以使其工作并获得对数据库和身份验证的访问权限时,我是否必须更改某些内容?

错误信息:

D/EGL_emulation(10634): app_time_stats: avg=6275.84ms min=9.86ms max=106419.61ms count=17
D/EGL_emulation(10634): app_time_stats: avg=11.48ms min=5.31ms max=40.71ms count=60
D/EGL_emulation(10634): app_time_stats: avg=9.29ms min=4.92ms max=16.29ms count=56
D/EGL_emulation(10634): app_time_stats: avg=8.66ms min=5.06ms max=15.26ms count=61
D/EGL_emulation(10634): app_time_stats: avg=9.94ms min=4.58ms max=24.23ms count=61
D/EGL_emulation(10634): app_time_stats: avg=10.22ms min=5.13ms max=20.02ms count=60
D/EGL_emulation(10634): app_time_stats: avg=8.59ms min=4.91ms max=15.28ms count=60
D/EGL_emulation(10634): app_time_stats: avg=8.31ms min=5.03ms max=16.29ms count=61
D/EGL_emulation(10634): app_time_stats: avg=8.91ms min=4.52ms max=14.01ms count=61
D/EGL_emulation(10634): app_time_stats: avg=9.90ms min=4.90ms max=17.99ms count=60
I/flutter (10634): 2 false
D/EGL_emulation(10634): app_time_stats: avg=9.15ms min=5.06ms max=22.87ms count=60
D/EGL_emulation(10634): app_time_stats: avg=83.28ms min=12.88ms max=1016.12ms count=15
W/Firestore(10634): (24.4.0) [WatchStream]: (24ebbad) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
W/DynamiteModule(10634): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule(10634): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller(10634): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.

这可能有很多原因。

  1. 检查你的 GitIgnore,也许一些 Firebase 配置文件没有上传到 Github,因此在克隆的项目中丢失。
  2. 检查您的 Firebase 安全规则。 检查如何允许您访问数据库。

如果这不起作用,请提供抛出的错误。

解决方案:

碰巧是我另一台计算机上的 android 模拟器是一个错误的版本,其中 firebase 无法正常工作。 我只需要从 android 模拟器 31.3.10 降级,然后一切正常。

该视频显示了如何: https://youtu.be/qo3SbdbXFos

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM