gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 03:07:21 25 4
gpt4 key购买 nike

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

  • 从Firebase项目添加google-services.json。
  • app / build.gradleapply plugin: 'com.google.gms.google-services'
  • android / build.gradleclasspath 'com.android.tools.build:gradle:3.2.1'
  • pubspec.yamlfirebase_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文档的说明。然后我用一个全新的项目再次尝试了。我该怎么做?

    最佳答案

    就我而言。

    通过更新项目级别的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

    关于firebase - ProcessException:进程 “…\gradlew.bat”异常退出:启动Gradle守护程序(后续构建会更快),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57962245/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com