【问题标题】:Firebase Realtime database with flutter ERRORFirebase实时数据库与颤振错误
【发布时间】:2020-02-20 12:54:16
【问题描述】:

我已经开始学习颤振了。并试图将 firebase 实时数据库集成到我的颤振项目中。但是,一旦我将依赖项添加到我的 android 部分的 build.graddle 文件中,我就开始收到此错误。

Launching lib\main.dart on A37f in debug mode...
* Error running Gradle:
ProcessException: Process "C:\Users\Username 
\Desktop\firebase_listview\android\gradlew.bat" exited abnormally:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Username\Desktop\firebase_listview\android\app\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> ASCII

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get 
more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Command: C:\Users\Username\Desktop\firebase_listview\android\gradlew.bat app:properties

我添加的时候就开始了

apply plugin: 'com.google.gms.google-services'

到app级build.graddle的底部

还有这个

classpath 'com.google.gms:google-services:4.3.2'

到我的项目级 gradle 文件。

我还在 pubspec.yaml 文件中为依赖项下的颤振添加了 firebase_databasse 依赖项

【问题讨论】:

    标签: firebase-realtime-database flutter flutter-dependencies


    【解决方案1】:

    尝试更改谷歌服务类路径
    来自
    类路径com.google.gms:google-services:4.3.2

    类路径com.google.gms:google-services:4.2.0

    【讨论】:

      猜你喜欢
      • 2021-08-05
      • 1970-01-01
      • 2021-04-07
      • 2021-11-13
      • 2020-04-15
      • 1970-01-01
      • 2020-08-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多