ProcessException:进程“ ... \ gradlew.bat”异常退出:启动Gradle守护进程(后续构建会更快)

时间:2019-09-16 18:07:22

标签: firebase gradle flutter

摘要
我开始使用Firebase学习Flutter。我有一些通过Kotlin android使用Firebase的经验。通过Android Studio运行全新的flutter应用程序时,它运行良好。但是,在完成Firebase的设置后,例如...

  1. 从Firebase项目添加google-services.json。

  2. app / build.gradle apply plugin: 'com.google.gms.google-services'

  3. android / build.gradle classpath 'com.android.tools.build:gradle:3.2.1'

  4. 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文档的说明。然后我用一个全新的项目再次尝试了。我该怎么办?

1 个答案:

答案 0 :(得分:3)

就我而言。

已通过更新项目级别build.gradle解决 在依赖类路径下 'com.android.tools.build:gradle:3.5.1'

enter image description here

,然后在gradle-wrapper.propertiesgradle-5.4.1-all.zip

enter image description here