无法确定任务':app:compileDebugJavaWithJavac'的依赖关系。[Flutter]

时间:2020-11-03 15:48:35

标签: android firebase flutter gradle gmsplay-services-vision

即使运行正常,我在尝试运行项目时也发现了此问题

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.
  2]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

  Dependency failing: com.google.android.gms:play-services-vision:20.0.0 -> com.google.android.gms:play-services-vision-co
  mmon@[19.0.2], but play-services-vision-common version was 19.1.0.

  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
  ifact with the issue.
  -- Project 'app' depends onto com.google.firebase:firebase-ml-vision@{strictly 24.1.0}
  -- Project 'app' depends onto com.google.android.gms:play-services-vision-face-contour-internal@{strictly 16.0.0}
  -- Project 'app' depends on project 'firebase_ml_vision' which depends onto com.google.firebase:firebase-ml-vision@20.0.
  0
  -- Project 'app' depends onto com.google.android.gms:play-services-vision-common@{strictly 19.1.0}
  -- Project 'app' depends onto com.google.firebase:firebase-ml-vision-face-model@{strictly 20.0.2}
  -- Project 'app' depends onto com.google.android.gms:play-services-vision-image-label@{strictly 18.0.4}
  -- Project 'app' depends onto com.google.android.gms:play-services-vision@{strictly 20.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-ml-vision-face-model@17.0.2

  For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
  endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
  github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
  uild.gradle file.

* 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 43s
Exception: Gradle task assembleDebug failed with exit code 1

1 个答案:

答案 0 :(得分:0)

您得到的错误看起来与我每次尝试使用 flutter pub upgrade 时得到的相似。

我在很长的问题评论中记录了我为使其工作所做的工作(我不想重新发布)。在此处查看详细信息 (https://github.com/FirebaseExtended/flutterfire/issues/3995#issuecomment-747795163)。