Skip to content

firebase-ml-vision 24.1.0 isn't compatible with google-service plugin: 4.3.3 #1904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
underwindfall opened this issue Aug 21, 2020 · 11 comments

Comments

@underwindfall
Copy link

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version:4.0.1
  • Firebase Component: ML(Vision)
  • Component version:24.1.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

When I use the latest version of firebase-ml-vision which is 24.1.0, the google service plugin (com.google.gms:google-services:4.3.3) isn't compatible with it. It display some error in gradle console such as

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.

Relevant Code:

in root build.gradle

dependencies {
          ...
        classpath "com.google.gms:google-services:4.3.3"
    }

in app/build.gradle

dependencies {
          ...
     implementation "com.google.firebase:firebase-ml-vision:24.1.0"
    }

The error stacktrace is below:

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 onto com.google.firebase:[email protected]
-- 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.firebase:[email protected]
-- 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}

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.

FYI

Even if did the googleServices { disableVersionCheck = false } to ignore the version check, the project still won't be compiled.

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@OliverRhyme
Copy link

Also experiencing this, any workaround??

@gobzila
Copy link

gobzila commented Aug 22, 2020

I have encountered the same issue with implementation 'com.google.firebase:firebase-ml-vision:17.0.0'.

@MustafaGangardiwala
Copy link

Try adding this in dependencies it worked for me:

implementation 'com.google.android.gms:play-services-vision:20.1.1'
implementation 'com.google.android.gms:play-services-vision-common:19.1.1'

https://firebase.google.com/support/release-notes/android#bom_v25-8-0

@umair13adil
Copy link

I have the same issue. Only working with:

//Vision
implementation 'com.google.android.gms:play-services-vision:20.0.0'

// ML Kit dependencies
implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.1'

And Google Play Services version:

classpath 'com.google.gms:google-services:4.3.3'

@rlazo
Copy link
Collaborator

rlazo commented Aug 24, 2020

Hi @underwindfall the latest release of ml-related SDKs have some known issues with their dependencies. Take a look at https://firebase.google.com/support/release-notes/android#mlkit-self-serve-fixes for workarounds. Do they fix your issue?

@underwindfall
Copy link
Author

@rlazo Thx for the response, however still doesn't work. Do you have any ideas why cause this issue ?
here is my latest implementation

dependencies{
......
    implementation 'com.google.android.gms:play-services-vision:20.1.1'
    implementation "com.google.android.gms:play-services-vision-common:19.1.1"
    implementation "com.google.android.gms:play-services-vision-face-contour-internal:16.0.2"
    implementation "com.google.firebase:firebase-ml-vision:24.1.0"
    implementation "com.google.firebase:firebase-ml-vision-face-model:20.0.2"
}

and the stacktrace associated it:

In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.1.
0]", 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-image-label:18.0.4 -> com.google.android.gms:play-servic
es-vision-common@[19.1.0], but play-services-vision-common version was 19.1.1.

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@16.0.2
-- Project 'app' depends onto com.google.firebase:firebase-ml-vision-face-model@20.0.2
-- Project 'app' depends onto com.google.android.gms:play-services-vision-common@{strictly 19.1.1}
-- Project 'app' depends onto com.google.android.gms:play-services-vision-face-contour-internal@{strictly 16.0.2}
-- 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@20.1.1
-- Project 'app' depends onto com.google.android.gms:play-services-vision-common@19.1.1
-- Project 'app' depends onto com.google.firebase:firebase-ml-vision@24.1.0
-- 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.1.1}

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.

@rlazo
Copy link
Collaborator

rlazo commented Aug 26, 2020

@underwindfall Try adding the following dependency

implementation 'com.google.android.gms:play-services-vision-image-label:18.0.5'

@underwindfall
Copy link
Author

Result

@rlazo Thx for sharing this information. Finally the project can compile like a charm.

I write all the consequences and necessary steps as below for anyone occurs the same issue like me.

Consequence after upgrade latest version

However all the methods to do the face detection work I try to use such as

FirebaseVisionFaceDetectorOptions.Builder()
            .setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE)
            .setLandmarkMode(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS)
            .setClassificationMode(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS)

are marked as Deprecated.

The reason why

The reason this firebase lib deprecated I think is the screenshot below (where I found here)

image

What need to do the migration

Just follow the doc ML KIT.

@rlazo
Copy link
Collaborator

rlazo commented Aug 26, 2020

Great summary @underwindfall !! Thanks for going the extra mile and add it to the issue.

@rlazo rlazo self-assigned this Aug 26, 2020
@seo0191
Copy link

seo0191 commented Sep 15, 2020

The library version sometimes makes my head lid open.
I think about the version every time, what is a good way,
I have a lot of work, so I will look for it next time😫

I was searching to add TensorFlow from existing face recognition
I searched far and came this far.

And the method I solved is below

implementation 'com.google.android.gms:play-services-vision:20.1.1'
implementation 'com.google.android.gms:play-services-vision-common:19.1.1'
implementation "com.google.android.gms:play-services-vision-face-contour-internal:16.0.2"
implementation 'com.google.android.gms:play-services-vision-image-label:18.0.5'
implementation 'com.google.firebase:firebase-ml-vision:24.1.0'
implementation 'com.google.firebase:firebase-ml-vision-face-model:20.0.2'
implementation 'com.google.firebase:firebase-ml-model-interpreter:22.0.4'
implementation 'org.tensorflow:tensorflow-lite:2.0.0'

@firebase firebase locked and limited conversation to collaborators Sep 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants