简体   繁体   中英

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter]

I found this issue when try to run my project even it was working fine

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

The error you are getting looks similar to what I was getting every time I tried to use flutter pub upgrade .

I documented what I did to get it working in a very long issue comment (that I don't want to repost). See details here ( https://github.com/FirebaseExtended/flutterfire/issues/3995#issuecomment-747795163 ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM