摘要
我开始使用Firebase学习Flutter。我有一些通过Kotlin android使用Firebase的经验。通过Android Studio运行全新的flutter应用程序时,它运行良好。但是,在完成Firebase的设置后,例如...
从Firebase项目添加google-services.json。
app / build.gradle
apply plugin: 'com.google.gms.google-services'
android / build.gradle
classpath 'com.android.tools.build:gradle:3.2.1'
pubspec.yaml
firebase_core: ^0.2.5 # add dependency for Firebase Core
及以下是
版本
android studio 3.4.1
flutter --version
Flutter 1.9.1+hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2d2a1ffec9 (10 days ago) • 2019-09-06 18:39:49 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0
gradle version : gradle-4.10.2-all.zip
我跑步时得到了
错误
* Error running Gradle:
ProcessException: Process "D:\DEV\flutter_firebase1\flutter_app\android\gradlew.bat" exited abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\DEV\flutter_firebase1\flutter_app\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 24s
Command: D:\DEV\flutter_firebase1\flutter_app\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.`
我发誓我完全遵守Firebase文档的说明。然后我用一个全新的项目再次尝试了。我该怎么办?