[英]Build Failed on integrating firebase_ml_vision 0.9.10 in flutter
Here is the same question .这是同样的问题。 The answer doesn't work for me and I can't add comment because of my less reputation.答案对我不起作用,由于我的声誉较低,我无法添加评论。 Hence asking the question again.于是又问了一遍。
The error thrown was:抛出的错误是:
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 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-bom@26.1.1
-- Project 'app' depends onto com.google.android.gms:play-services-vision-image-label@{strictly 18.0.4}
-- Project 'app' depends onto com.google.firebase:firebase-bom@{strictly 26.1.1}
-- Project 'app' depends onto com.google.android.gms:play-services-vision@{strictly 20.0.0}
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 = true }" to your bu
ild.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 3s
Exception: Gradle task assembleDebug failed with exit code 1
Here is my android level build.gradle这是我的 android 级别 build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
}
Here is my app level build.gradle这是我的应用程序级别 build.gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2'
api 'com.google.firebase:firebase-ml-vision-face-model:20.0.2'
implementation platform('com.google.firebase:firebase-bom:26.1.1')
}
apply plugin: 'com.google.gms.google-services'
I have also tried removing these two lines.我也试过删除这两行。 api 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2' api 'com.google.firebase:firebase-ml-vision-face-model:20.0.2'
because these are deprecated now. api 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2' api 'com.google.firebase:firebase-ml-vision-face-model:20.0.2'
because these are deprecated现在。
In my AndroidManifest.xml, I have added this:在我的 AndroidManifest.xml 中,我添加了这个:
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="barcode,face,label,ocr" />
How do I solve this issue?我该如何解决这个问题? I am stuck with this for several days now.我已经坚持了好几天了。
Check out this reply on the issue in official Github repo: https://github.com/FirebaseExtended/flutterfire/issues/3995#issuecomment-723401583在官方 Github repo 中查看此问题的回复: https://github.com/FirebaseExtended/flutterfire/issues/3995#issuecomment-723401583
Also, this issue is a duplicate here:此外,此问题在此处重复:
https://github.com/FirebaseExtended/flutterfire/issues/3995 https://github.com/FirebaseExtended/flutterfire/issues/3995
I think this will work for you.我认为这对你有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.