任务':cloud_firestore:extractDebugAnnotations'的执行失败

时间:2019-12-30 15:59:55

标签: firebase flutter dart

在运行时颤振中遇到此错误。应用已成功连接到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

1 个答案:

答案 0 :(得分:0)

尝试一下。

  1. 将Gradle升级到5.4.1版。
  2. 将Gradle插件版本升级到3.5.0。
  3. 在项目的android目录中运行命令./gradlew dependencies,该命令下载了缺少的path_provider依赖项。
  4. 先运行flutter clean,然后运行flutter run