首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Flutter Firebase/ Firestore -无法到达云修复后端。后端在10秒内没有响应

Flutter Firebase/ Firestore -无法到达云修复后端。后端在10秒内没有响应
EN

Stack Overflow用户
提问于 2022-08-31 17:13:11
回答 5查看 582关注 0票数 2

目前,我正在VSCode中开发一个颤振项目,使用防火墙作为我的数据库。我已经在这个项目上工作了很多个月,在连接到任何方式上都没有任何问题。最近,我获得了新的硬盘驱动器,我传输了我的所有文件,一切都正确编译。我更新了所有的依赖项,“颤栗博士”没有任何问题,我已经在以前的帖子上搜索了几个小时,几乎所有的解决方案都没有工作。

我没有改变我的任何代码-在它工作和不工作之间。我已经改变了许多设置和配置文件,试图让它现在工作。

两个重要备注

我正在通过Android在模拟器上试用

  1. 。我在3种不同的仿真器上试过。使用google
    • 1安装了
    • 1,没有安装google服务,安装了
    • 1而没有安装google服务,这是我手动安装的

他们都有同样的问题。

当前正在访问数据库successfully.的许多设备上运行旧版本的

错误--我得到了

代码语言:javascript
运行
复制
W/DynamiteModule( 6511): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6511): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6511): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6511): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
W/Firestore( 6511): (24.2.2) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore( 6511):
W/Firestore( 6511): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
W/DynamiteModule( 6511): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
W/Firestore( 6511): (24.2.2) [WatchStream]: (4aed552) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
I/DynamiteModule( 6511): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6511): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6511): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]

我从其他论坛文章中尝试过的步骤:

Multidex

  • Used connection

  • Checked在
  1. 上放置的3种AndroidManifest.xml文件中的
  2. 放在AndroidManifest.xml下的main
  3. 启用了一个不同的wifi
  4. ,第二天的问题相同,
  5. 的最小SDK版本是21

H 136仿真器都有wifi连接。(我通过搜索online)

  1. Others进行了测试,我不记得

颤振医生:

代码语言:javascript
运行
复制
[√] Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.19044.1889], locale en-US)
    • Flutter version 3.3.0 on channel stable at D:\Coding\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffccd96b62 (2 days ago), 2022-08-29 17:28:57 -0700
    • Engine revision 5e9e0e0aa8
    • Dart version 2.18.0
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\mjdk9\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: D:\Applications\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.3.32825.248
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at D:\Applications\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.19044.1889]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 104.0.5112.102
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 104.0.1293.70

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

pubspec.yaml依赖关系

代码语言:javascript
运行
复制
dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  firebase_core: ^1.4.0
  firebase_auth: ^3.0.1
  cloud_firestore: ^3.4.6
  firebase_analytics: ^9.3.3
  material_floating_search_bar: ^0.3.4
  provider: ^6.0.3
  flutter_launcher_icons: ^0.10.0
  url_launcher: ^6.0.10
  url_launcher_web: ^2.0.4
  flutter_rating_bar: ^4.0.0
  smooth_star_rating: ^1.1.1
  dropdown_button2: ^1.0.7
  confetti: ^0.7.0
  flutter_native_splash: ^2.1.6
  http: ^0.13.4
  get: ^4.6.1
  audioplayers: ^1.0.1
  loader_overlay: ^2.0.6
  webview_flutter: ^3.0.2
  syncfusion_flutter_datagrid: ^20.1.61
  cloud_functions: ^3.2.17

app/build.gradle

代码语言:javascript
运行
复制
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

defaultConfig {
        multiDexEnabled true
        applicationId "com.mjdk99.matter_medical_supplies"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation platform('com.google.firebase:firebase-bom:30.3.2')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
}

build.gradle

代码语言:javascript
运行
复制
buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath 'com.google.gms:google-services:4.3.13'
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
}
EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2022-09-24 08:16:40

如果您使用的是link仿真器,请遵循此。只需更改仿真器版本。对我起作用了。

票数 1
EN

Stack Overflow用户

发布于 2022-08-31 23:12:42

现在,我也有这个问题,android模拟器没有连接到我的防火墙,没有问题,我的物理设备。不过,我可以使用相同的项目,但使用Firebase模拟器套件,而不是我的db。

也许解决不了你的问题,但至少在你解决问题之前,这是一个解决办法。

票数 2
EN

Stack Overflow用户

发布于 2022-09-02 15:17:28

我解决了我的问题。我尝试了两种不同的wifi在工作,但仍然有相同的错误。当我在家里登录我的无线网络时,它终于成功了。我几天前就该试过了。这样就省去了很多小时的挫折。

我不知道有什么不同,因为我已经做了所有的工作之前,我得到了新的硬盘。一些需要注意的事情。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73559563

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档