【问题标题】:Gradle task assembleDebug failed with exit code 1 after debugging the app调试应用程序后,Gradle 任务 assembleDebug 失败,退出代码为 1
【发布时间】:2019-12-08 15:38:40
【问题描述】:

今天我在一周后开始运行和调试我的应用程序并遇到了一些错误。我在网上搜索在 GitHub 上找到了一些解决方案,但它们对我帮助不大。 这是我得到的-

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-e7b69ced2e2408da86261227a04f09e0c0fe905d.
     Required by:
         project :app
         project :app > project :firebase_auth
         project :app > project :cloud_firestore
         project :app > project :google_sign_in
         project :app > project :firebase_core
         project :app > project :firebase_storage

等等…… 这是颤振医生-v

[√] Flutter (Channel master, v1.13.1-pre.59, on Microsoft Windows [Version 10.0.18363.476], locale en-IN)
    • Flutter version 1.13.1-pre.59 at C:\Users\acer\flutter
    • Framework revision e58dc16d7b (35 hours ago), 2019-12-06 18:21:52 -0800
    • Engine revision e7b69ced2e
    • Dart version 2.7.0 (build 2.7.0-dev.2.1 a9c77229c2)


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\acer\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)        
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.40.2)
    • VS Code at C:\Users\acer\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.7.0

[√] Connected device (1 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

我尝试了这里提到的解决方案-https://github.com/flutter/flutter/issues/30573

这是我的 pubspec.yaml 依赖项-

cupertino_icons: ^0.1.2
  firebase_auth: ^0.14.0+5
  firebase_core: 0.4.2+1
  cloud_firestore: ^0.12.9+4
  provider: ^3.1.0+1
  flutter_spinkit: "^4.0.0"
  google_sign_in: ^4.0.14
  firebase_storage: ^3.0.8

【问题讨论】:

  • 你的 pubspec 依赖项是什么?
  • 您是否遵循了所有这些步骤? firebase.google.com/docs/flutter/setup
  • 是的,我关注了它,发现错误一个依赖没有更新。谢谢。
  • 您应该发布答案并接受它,以便其他面临问题的人可以找到答案。
  • 好的,我会的。

标签: android debugging flutter


【解决方案1】:

您必须按照此处的步骤进行操作-firebase.google.com/docs/flutter/setup
这里的问题是我的 pubspec.yaml 文件中没有启用分析。

firebase_analytics: ^5.0.2

感谢@Benjamin S。

【讨论】:

    猜你喜欢
    • 2019-11-05
    • 2021-06-24
    • 2020-10-31
    • 2020-03-08
    • 2021-08-01
    • 2021-08-02
    • 2020-08-06
    • 2020-08-18
    • 2021-06-20
    相关资源
    最近更新 更多