首页 > 解决方案 > 任务“:cloud_firestore:extractDebugAnnotations”执行失败

问题描述

在运行时面临这个错误。应用程序已成功连接到 Firebase。也花了太多时间运行我正在使用android studio。

//依赖

dependencies:
  flutter:
    sdk: flutter
  cloud_firestore: ^0.13.0+1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cloud_firestore:extractDebugAnnotations'.
> Could not resolve all files for configuration ':cloud_firestore:lintClassPath'.
   > Could not download kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.5.0)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.5.0/kotlin-compiler-26.5.0.jar'.
         > Premature end of Content-Length delimited message body (expected: 24538383; received: 14942096

* 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 13m 20s
Finished with error: Gradle task assembleDebug failed with exit code 1

标签: firebaseflutterdart

解决方案


尝试这个..

  1. 将 Gradle 升级到版本 5.4.1 。
  2. 将 Gradle 插件版本升级到 3.5.0 。
  3. Run the command ./gradlew dependencies in project's android directory which downloaded missing path_provider dependencies.
  4. Run flutter clean then flutter run.

推荐阅读