简体   繁体   English

在 flutter 中集成 firebase_ml_vision 0.9.10 时构建失败

[英]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.

相关问题 Flutter firebase_ml_vision 构建失败,出现异常 - Flutter firebase_ml_vision build failed with exception Flutter - firebase_ml_vision - 不基于 IOS - textRecognizer 不起作用 - Flutter - firebase_ml_vision - doesn't build on IOS - textRecognizer doesn't work 在 Flutter 上的 firebase_ml_vision 中计算人脸的函数 - Function to count faces in firebase_ml_vision on Flutter 使用 firebase_ml_vision 时抖动错误 - Error in flutter while using firebase_ml_vision firebase_ml_vision 中断 IOS 构建,修复 Windows 机器 - firebase_ml_vision breaks IOS build, fix for Windows machine Flutter firebase_ml_vision 错误与异步函数、getImage 和pickFile - Flutter firebase_ml_vision errors with async function, getImage and pickedFile 用 firebase_ml_vision 将识别中的 0 替换为 O - Replace 0 by O in the recognition with firebase_ml_vision 如何使用flutter firebase_ml_vision插件实时读取字符或条形码 - How to use flutter firebase_ml_vision plugin for live reading of characters or barcodes 将 firebase_ml_vision 添加到 flutter 引发错误“未知类型名称”FIRVisionCloudLabelDetector” - Add firebase_ml_vision to flutter raise an error 'Unknown type name 'FIRVisionCloudLabelDetector' Flutter:将 firebase_ml_vision 依赖项从 0.9.x 升级到 0.10.0 - Flutter: upgrading firebase_ml_vision dependency from 0.9.x to 0.10.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM